Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2009
    Posts
    6

    Unanswered: Comparing Premiums by Date

    Hello,

    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.

  2. #2
    Join Date
    Aug 2009
    Posts
    6
    Perhaps I need to make another connection to the spreadsheet for the right side 2008 and link Date3 and Date4 in that manner? Any thoughts?

  3. #3
    Join Date
    Dec 2004
    Location
    Connecticut
    Posts
    85
    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).

  4. #4
    Join Date
    Aug 2009
    Posts
    6

    Subreport

    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?

    FYI

    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.

  5. #5
    Join Date
    Dec 2004
    Location
    Connecticut
    Posts
    85
    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.
    Last edited by trowe; 08-25-09 at 10:32.

  6. #6
    Join Date
    Aug 2009
    Posts
    6
    The only time it says new page after is in the group footer and that part if grayed out. I am using Crystal Reports 11.

    Thx

  7. #7
    Join Date
    Aug 2009
    Posts
    6
    I clicked off the option can group in the subreport and it the subreport lined up with the data, however, all the date in the subreport was suppressed.

  8. #8
    Join Date
    Aug 2009
    Posts
    6
    I just tried using the main with two subreports left and right and it seems to be working better.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •