PDA

View Full Version : Subreports and paging



craigkrum
19-Feb-2010, 03:20 PM
There seems to be an issue with the paging when I include a subreport in my main report. I have a small subreport that simply lists the contents of a database (around 12 records) in the detail line of the main report. When I press F5 the first time I enter VRW to preview the report I usually get what I expect, each record of the main report with the list from the subreport between them. When I press the F5 again, even without making any changes whatsoever, I will get a pagebreak after each record of the main report. The list from the subreport will be on the next page, then another page break, followed by the next record from the main report, and so on. Another press of the F5 key may, though usually not, display the report properly again. It's pretty inconsistent, but without the subreport, the records from the main report display properly no matter how many times I press F5.

Vincent Oorsprong
20-Feb-2010, 12:03 PM
Craig.

Sorry, I cannot duplicate this report. Can you make a report (with subreport) on test data that demonstrates the behavior in a repeatable way and we will look at it. Please send it to support @ dataaccess.eu

craigkrum
22-Feb-2010, 01:00 PM
I have isolated the problem. It only occurs when you include NO data from the main file in the section where you insert the subreport. In my case, I had a group header section with information from the main file and a detail section that only inculded the subreport. This is when the problem occurs. If I add a field from the main file to the detail section and then insert the subreport it worked fine.

One thing I noticed is that if you make any changes to the subreport you must delete it and re-insert it into the main report for the changes to take place (just like with database changes). Likewise, if you add a field from the main file to the detail section to correct the above problem, you must delete and re-insert the subreport to fix it.

Vincent Oorsprong
22-Feb-2010, 01:24 PM
Craig,

Sorry I still cannot reproduce what you report. Nor the page breaks when no header information is printed or a change of information in the subreport that requires re-insert of the subreport.

I've enclosed a zip file showing my test report for the duplication of the reported problem.

PS: If you want to test my report, don't forget to change the path to the datasource to your location of the tables.

craigkrum
22-Feb-2010, 02:15 PM
Vincent,

Ah, I see the difference. In my case, I have just a static list of items in the database in my subreport that are not related to the main database. I simply want this list of items to repeat on the report for each item in the main database.

With your example, I put the customer name in the group header and then removed the linking and filter functions. This duplicates my situation by giving me the first customer name, then a pagebreak, then the list of orders, then a pagebreak, then the next customer name, then a pagebreak, list of orders, etc. While you have a large order file, the same pagebreaks happen with even 1 record in the database used by the subreport.

ivankaupa
24-Feb-2010, 12:01 PM
Hi Vincent,

I tried to use a Subreport to show the items (Invt) from a Vendor and I got the same problem.

I created the Main Report witha break on Vendor.ID and put the sub-report on detail B.

The report breaks a new page before print the subreport.

I'm attaching the file.

Regards,
Ivan Kaupa

Vincent Oorsprong
24-Feb-2010, 12:35 PM
Ivan,

We will look at this.