是否可以在同一个Crystal报表中包含子报表或2个报表?

时间:2022-04-16 16:38:14

I'm using Crystal Reports in vs2008, so I'm using datasets with procedures to get the data from the db, my escenario is the following:

我在vs2008中使用Crystal Reports,所以我使用带有过程的数据集来从db获取数据,我的escenario如下:

In the same Crystal Report, I have to show two reports, basically using the sames datasets, and the same database, but they are different queries (have grouping and summing instead)

在同一个Crystal Report中,我必须显示两个报告,基本上使用相同的数据集和相同的数据库,但它们是不同的查询(具有分组和求和)

Is this possible? And if it is how can I solute this, using database expert? or crosstab? What options of crystal reports supports these operations?

这可能吗?如果是这样,我怎么能用数据库专家解决这个问题呢?还是交叉链?哪些水晶报告选项支持这些操作?

2 个解决方案

#1


2  

You should be able to insert a "sub report" in Crystal on your primary report. You can pass parameters from the main report to the sub report and utilize a whole different command in the sub report. I'm not sure the exact keyboard sequence to insert a sub report in VS2008, but in CR 2008, it's as simple as using the file menu INSERT > SUB REPORT.

您应该能够在主要报表上的Crystal中插入“子报表”。您可以将参数从主报表传递到子报表,并在子报表中使用完整的不同命令。我不确定在VS2008中插入子报告的确切键盘顺序,但在CR 2008中,它就像使用文件菜单INSERT> SUB REPORT一样简单。

#2


1  

Based on my own experiences, I have to agree with Greg - a subreport is probably the easiest-to-maintain solution to your problem. In the case of VS2008, the steps to follow are:

根据我自己的经验,我必须同意Greg - 子报告可能是最容易维护的解决方案。在VS2008的情况下,遵循的步骤是:

  1. Go to the Crystal Reports -> Insert -> Subreport menu option.
  2. 转到Crystal Reports - >插入 - >子报表菜单选项。

  3. Click where you want to place the subreport on the main report.
  4. 单击要将子报表放在主报表上的位置。

  5. The 'Insert Subreport' form will be displayed. Either choose an existing report, or create a new one using the Report Wizard. In the Report Wizard, you can also choose from the existing datasets un your project.
  6. 将显示“插入子报表”表单。选择现有报告,或使用报告向导创建新报告。在报告向导中,您还可以从项目中选择现有数据集。

To link your main report to the subreport right-click on the Subreport, and choose 'Change Subreport Links'.

要将主报表链接到子报表,请右键单击子报表,然后选择“更改子报表链接”。

Hope that helps.

希望有所帮助。

#1


2  

You should be able to insert a "sub report" in Crystal on your primary report. You can pass parameters from the main report to the sub report and utilize a whole different command in the sub report. I'm not sure the exact keyboard sequence to insert a sub report in VS2008, but in CR 2008, it's as simple as using the file menu INSERT > SUB REPORT.

您应该能够在主要报表上的Crystal中插入“子报表”。您可以将参数从主报表传递到子报表,并在子报表中使用完整的不同命令。我不确定在VS2008中插入子报告的确切键盘顺序,但在CR 2008中,它就像使用文件菜单INSERT> SUB REPORT一样简单。

#2


1  

Based on my own experiences, I have to agree with Greg - a subreport is probably the easiest-to-maintain solution to your problem. In the case of VS2008, the steps to follow are:

根据我自己的经验,我必须同意Greg - 子报告可能是最容易维护的解决方案。在VS2008的情况下,遵循的步骤是:

  1. Go to the Crystal Reports -> Insert -> Subreport menu option.
  2. 转到Crystal Reports - >插入 - >子报表菜单选项。

  3. Click where you want to place the subreport on the main report.
  4. 单击要将子报表放在主报表上的位置。

  5. The 'Insert Subreport' form will be displayed. Either choose an existing report, or create a new one using the Report Wizard. In the Report Wizard, you can also choose from the existing datasets un your project.
  6. 将显示“插入子报表”表单。选择现有报告,或使用报告向导创建新报告。在报告向导中,您还可以从项目中选择现有数据集。

To link your main report to the subreport right-click on the Subreport, and choose 'Change Subreport Links'.

要将主报表链接到子报表,请右键单击子报表,然后选择“更改子报表链接”。

Hope that helps.

希望有所帮助。