Crystal Reports: including a subreport into a grou

2019-08-07 14:19发布

问题:

I have a report which lists out a company detail. There are two sections to the company detail. The first portion lists out environmental data and the second is actually a subreport which lists out Cash flow details for every single year of the company.

I have multiple companies i need to do this for--so i grouped the report by Company. This works like a dream except for when it comes to the subreport. I'm having real issues trying to get it so that every single company has a different subreport of cash flow. Anybody know how to include a subreport into a group so that every company i have has its own data for the cash flow data?

回答1:

The subreport has to take a parameter that identifies a company, which the main report will provide. Then you link the value to the parameter via the subreport properties available on the main report page.



回答2:

You have to link the subreport to the main report: right-click on the subreport and choose "Edit subreport links". Here you can select the fields to use to link the main report and the subreport.



回答3:

  1. You have to link the subreport to the main report: right-click on the subreport and choose "Edit subreport links". Here you can select the fields to use to link the main report and the subreport.

  2. Edit Subreport and in Menu, Click Report -> Select Expert and click show formula button. By default it shows Record Selection radio button.

  3. You copy that formula and choose Group Selection and paste and give ok.

  4. It will work :-)