Originally Posted 28 April 2017, 5:14 pm ESTI got a main report with no Data Source attached, and a subreport with attached one. They don't need to be linked. The subreport function is to show the table content only (SubreportFilter property empty). When the main reports renders, then display and error. If I link them with any field in main report, then error dissapear, but obviusly the subreport content is not what expected. ¿How I can display the subreport data without link them?
Not Linked SubReport
Originally Posted 28 April 2017, 5:14 pm EST
ReplyThanks. I redo from zero the report (copy/paste some fields from original report to new one) and It works. Unfortunatelly the original never works. I attached for further analyze.
I analysed your report and found out three things:
1. On running the report just after removing the data source of the subreport, the report shows the subreport as expected.
2. In the same report from above, if we try to modify the main report by say, deleting a control, the report now renders with an error. This error is overcome by removing all but the subreportfield control from the main report. This makes the subreport render in the main report now.
3. I also tried binding the report to a dummy database, but that does not seem to work.
To investigate the issue further in detail, I would need you to share dummy data. Also, let me know how exactly did you create this report?
I attach dummy data. When I create the report, I add it as blank report, then add fields, then I add the subreport. But when I add the subreport field and render,the report crash.
From what I understood from your requirement is that you want plain data from the second report to be displayed in the main report that itself is not linked with a data source.
I tried to implement the same scenario at my end and the reports worked just fine, even without linking the two reports with any field. Kindly have a look at the attached report and modify it as per your requirement. If this does not help you, share your report so that I can assist you further.
Note: Make sure that you change the path of the data source used in the report to C1Nwind.mdb shipped with the product.
ReplyThank you for sharing your data source. I could run the report at my end after adjusting some fonts. However the problem does not replicate at all. I even tried adding a new subreport (without linking any field) and it worked without issues.
Can you please try running the attached modified report at your end and see if the problem still occurs? If it does, please share a screenshot of the error at your end.
Marked as Answer
Thks a lot.