crystal-reportscrystal-reports-2010crystal-reports-xicrystal-reports-8.5crystal-reports-server

I Want to Print 1 report in two copies(2 Prints ) with same data in crystal report having Subreport?


Normally if we have report without any sub report in it, it is easy to print twice the report by adding same report in page footer as sub report . But if report contains already subreport than it is not possible to again add subreport in it. So how can we Print such report twice in crystal report.


Solution

  • It must exist a better solution, but here it goes two workarounds:

    Alternative 1:

    Turn your main report into a subreport (with its child subreport) and duplicate it in a brand new main report.

    Advice: subreports use to perform poorly, but if your data is not large, it is ok.

    Alternative 2:

    If you can easily manipulate the data source (for example, if your generating a dataset through code), use the details section for your report, insert an extra table in your data source where the number of lines is the number of "copies" that you want to print. Let your main table join with this "fake" table without links. The result will be a cartesian product, so you will get the number of copies you want.

    Extra note: Crystal let you use another rpt file as a subreport. Maybe you can use this feature to solve your problem. Personally, I don't like this feature, because it does not behave like I would expect by intuition.