I am trying to create a report that compares premiums from 1 set of beginning and end dates (i.e. Jan through July 2009 displayed on the left side of the report) to second set of beginning and end date (i.e. Jan through July 2008 displayed on the right side of the report).
I am easily able to display the first set of premiums (the left side) by using a start and end date parameter (Date1 and Date2) by linking them to each record via the selection expert. However, the right side of the data displays the same data as the left side because Date1 and Date2 are being past to fields on the right as well.
I created a Date3 and Date4 parameter for the right side and linked them to to the fields on the right. However, the data on the right now matches the data on the left because each record is now pulling Date3 and Date4 instead of Date1 and Date2.
Is there a way in which I can create this premium comparison on the same page via these parameters? I tried to use a subreport for the right side and add it to the main report, but I ran into formatting issues.
Any help would be appreciated! I am fairly new to Crystal.
Since you actually need two sets of data - this year's premiums and last year's premiums - it makes sense to use subreports.
One will cover the left side of the page and return this year's data. The other covers the rest of the page and shows last year's data. The only difference is the parameters used to pull the data in each report.
If you're really ambitious, put Date1 and Date2 in the main report and pass them to the subreports (calculate Date3 and Date4 by subtracting whetever period you want from Date1 and Date2).
Thanks for the response. The problem I am having with the subreport is formatting. The data looks to be correct, but on the left side each product line is being printed on a separate page, while on the right side all the information is fine. How do I keep the left side from printing the product lines on multiple pages?
The report consists of two groups
group 1 -- business units (3)
group 2 -- product lines 34 lines over 3 business units.
Also, I tried to use multiple connections, but I have had no luck with them either.
Is there a page break attached to one of the sections of your subreport? Look for "Page Break After" in section formatting.
In some versions of CR, you can store a subreport as a separate file and import it into a main report. After you attach it to the main report, you can edit it - there are options to update the external file or to requery it when the report is run - it depends whether you want the changes to the subreport to be propagated to every place where this subreport is used.