Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy and paste subreport within the main report

I have a report that includes a sub report. I need to add a same sub report with minor modification for the report. Is there a way to copy one existing report within the main report, paste it, then go into that new sub report and only have to make the changes required for the slight differences between the sub reports. Please let me know.

like image 978
codematrix Avatar asked Mar 07 '14 05:03

codematrix


People also ask

How do I share subreport data with main report?

To share values between a subreport and the main report in Crystal Reports, use shared variables. Using shared variables requires at least two formulas: One to store the value in a shared variable. Tthe other to retrieve the value from the shared variable.

How do you add a subreport to an existing report in Access?

In the Navigation Pane, right-click the report to which you want to add a subreport, and then click Design View. In the menu that appears, ensure that Use Control Wizards is selected. Open the Controls Gallery again, and then click Subform/Subreport. On the report, click where you want to place the subreport.


2 Answers

  1. Open the existing subreport and do a save subreport as and save a local copy.
  2. now make the necessary changes in that saved copy.
  3. Add the changed subreport by using option insert sub report and Existing report.
like image 94
Siva Avatar answered Sep 27 '22 19:09

Siva


You will need two reports 1) Main Report 2) Subreport

1) Create a new standalone report that will be your Sub report

2) On you Main report, Click Insert Subreport -> Select Choose Existing Report -> Browse to the newly created subreport -> OK.

3) You will have a subreport that want. Now add links between sub report and Main report using Subreport links

4) This way you can add the same report multiple times and then in each subreport, you can do the individual changes you wish to do on each subreport, without having to change the whole report everytime.

Hope it helps.

The slight problem with @Siva answer is if you go into a Subreport and then go File -> Save As, Crystal still prompts to save the Main report which is now incl the Subreport and not the Subreport by itself. Hence in Step 3 Siva's answer the whole Main report would get added, instead of just the subreport.

like image 38
aMazing Avatar answered Sep 27 '22 19:09

aMazing