Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multiple Subreorts - Summaries and Date Calcs Post Reply Post New Topic
Author Message
CRaid
Newbie
Newbie


Joined: 07 Jan 2013
Online Status: Offline
Posts: 13
Quote CRaid Replybullet Topic: Multiple Subreorts - Summaries and Date Calcs
     Posted: 08 Jan 2013 at 3:09am
FYI - This is also for Crystal Reports 2008 in Epicore 9 using BAQ to retrieve the XML.  The same topic is under Technical Questions.
 
First, before I forget, I am also wondering how you would write the code for getting the month's name for the Month report out of character field for the date.  For example:.
   {BAQReportResult.Option01} = "05/01/2012"
   {BAQReportResult.Option02} = "01/31/2013"
Since the most recent month is 01/2013, the subreport for Month Totals would only consist of data for 01/2013.  The report title must have the month's name and year in it:  "Sales Lead Monthly Totals for January 2013".  I am confused as to how to retrieve the month and convert into the month's name.  Please advise on this.
 
NOW FOR THE BULK OF THE PROBLEM:
 
I also need to create one report with multiple subreports.  The reports will use the same data and ALL are based on a date range entered by the user.  The report data is retrieved via XML.  This date ranges may not always consist of a current date.
 
The reports are pulling in sales leads by campaign and event.  The summaries are for lead ratings, "A" and "B".
 
I need to have the following summaries on new pages:
  - YTD Totals
  - Quarter Totals (this is to be the most recent quarter only)
  - Month Totals (this is to be the most recent month only)
 
Besides these reports, I am not sure how to add a couple of other summaries.  This is to include the totals for lead ratings, "C" and the total leads for the report summary type (YTD, Quarter and Month).  At the very end of the reports, I also need to include the  percentage of lead rating "C" versus the totals after each of these reports are run.  I need the reports to come out at the same time, not on demand.  Do I need to link the data's details?  Do I put the same data set in for each and every report, or can each of the summary reports be linked to the main page?  Can the main page be for YTD Totals and all remaining reports be passed the data and parameters?  I am probably thinking about this way too complicated.  Can someone ease my confusion?
 
Any help on this?  Is it possible to put it all together in one report?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Jan 2013 at 9:14am
all subreports would use the same data.  When you design the subreports, you would use the datasource for all of them (think of the XML as a table (though it might be several)).
 
what I would do, since each subreport is supposed to be on it own page, is I would place each subreport in its own section of the report footer, and each set to 'Print new page before'.
 
as for finding the month, if there isn't a built in function, you could create an array of {'January',...} or whatever the syntax is (check CR help) in the report header, then you could use something like MonthArray[Month({table.field})].  This would convert the month from the date into a value, and then fetch the corresponding value from the array that you built...at least this is the strategy that I start with.
 
HTH
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum