1
votes

I created a crystal report and since my data had many columns, I can't display them all in a row. So, my expected result will be somehow look like this:

Date Col1 Col2 Col3 Col4
(data)

Date Col5 Col6 Col7 Col8
(data)

I put the first chunk of data (Date - Col4) in the main report and the second chunk in the subreport. I was able to perform the date range selection by passing the parameter from main report to subreport (the dates show in both reports). When comes to display the data, it worked well in main report, but not in subreport. I've done a testing on generating both reports with same data, main report no problem, but in subreport it displayed the last record only in all rows. I've tried with passing parameter and shared variable but still no luck. I also discovered that if I put my subreport in report header, it displayed the first record in all rows. (Initially I put my subreport in report footer)

So, any suggestion on how to pass the data from main report to subreport (with date selection) and both reports look the same (for my testing currently)?

2
where is your main report data in which section and where are you palcing your sub report (in which section)?Siva
I placed my main report data in detail section, sub report in report footer b, the report footer a is for the summary of the data in main report.Alyw

2 Answers

0
votes

You have to pass not date range, but link subreport to specific date from same row.

Otherwise you don't need subreport at all. You may just put two rows of data fields into detail section, would be much easier. Or, if you need to hide second row of dates sometimes, then create two detail sections and so on.

0
votes

try this:

take 2 sub reports each sub report in each detail section and now in detail a section sub report place date and 4 columns and in detail b section sub report place date and remaining 4 columns