如何将多个 Crystal Report 放入一个 Crystal Report 查看器中?
所以事情是这样的..
我编写了 ac# 应用程序,为每个员工生成每月的出勤报告,并附有他自己的详细信息 我希望能够为所有员工执行一次此操作并查看按姓名分组的报告 因此,当我从水晶报表子树中选择客户名称时,我会得到他的每月出勤报告,
我真的不知道如何在水晶报表中使用子树......是否有可能这样做?
所有这一切的目标是能够一键打印所有报告
So here is the thing ..
I wrote a c# application to generate monthly Attendance Reports for each employee with his own details
I want to be able to do this once for all employees and view the report grouped by name
so when I select the customer name from the crystal report sub tree I get his monthly Attendance Report
I don't really know how to use the sub tree in crystal report ... is it possible to something like that ?
the goal from all this is to be able to print all reports at once in one click
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这并不完全是您所要求的,但我将发布它,因为它可能对您有用。我在类似的情况下为我做了。另外对 VB 语法表示抱歉。
这将允许您使用 Crystal Reports 引擎将报告创建为 PDF。基本上,它允许您使用循环创建多个 PDF,然后可以自动打印。Export PDF Sub 会将文件写入磁盘,然后使用默认的 pdf 阅读器打开它。打印 PDF 功能将自动打印保存到磁盘的 PDF 文件。这不是一个完美的解决方案,但我希望它至少能让您更接近您想要实现的目标。
公共类 PDFCR
结束类
我无法让导入在此代码块中显示,因此这里它们以纯文本形式显示。
导入 System.IO
导入 System.Management
导入 CrystalDecisions.Shared
导入 System.Runtime.InteropServices
导入 CrystalDecisions.CrystalReports.Engine
This is not exactly what you asked for but I am going to post it because it may work for you. I did for me in a similar situation. Also sorry about the VB syntax
This will allow you to create your reports as PDFs using the Crystal Reports engine. Basically it will allow you to create multiple PDF using a loop, which can then be printed automatically.The Export PDF Sub will write the file to disk and then open it with the default pdf reader. The print PDF function will automaticaly print the PDF files that were saved to disk. This is not a perfect solution but I hope that it at least gets you closer to what you are trying to accomplish.
Public Class PDFCR
End Class
I was having trouble getting the Imports to show in this code block so here they are in plain text.
Imports System.IO
Imports System.Management
Imports CrystalDecisions.Shared
Imports System.Runtime.InteropServices
Imports CrystalDecisions.CrystalReports.Engine
如果您在报告中的“员工姓名”字段中添加“组”,这将(默认情况下)创建您正在查找的组树。
从那里,从代码角度来说,它可以被关闭,但如果您的报表中有任何组,您应该默认看到组树。
问题似乎是报告没有按员工姓名分组。
If you add a GROUP to your report on your Employee Name field, this will (by default) create the group tree you are looking for.
From there, code-wise, it can be turned off, but you should see the group tree by default if your report has any groups in it.
The problem seems to be with the report not being grouped on Employee Name.