Hi
Recently I encountered a question about SAP Crystal Report that I have a rpt file with several sub reports and I am required to make the data source to be XML with http/https URLs. I created different .NET pages which returns XML stream as data source for both main report and sub reports in my rpt file, and also created a sub report links which pass dynamic parameters from main report to the sub reports, everything worked fine when I entered the necessary parameters only for the main report in the design tool, both the main report and sub reports displayed perfectly.
But it did not work in my .NET application which export the reports to PDFs, I referenced “CrystalDecisions.CrystalReports.Engine” and some other necessary DLLs into my project, and then I created an instance of ReportDocument, loaded the rpt file, set parameters which used in the main report, set connection info, and at last when I export the report it throw out an exception with “Missing Parameter Values” error message, even though I removed the sub report links which pass parameters from main report, the exception still occurred, but when I removed all the sub reports, and only export the main report it worked!!
Here is a result of my attempts:
| Main Report | Sub Report | Result |
1 | With XML data source | No report | Works fine with dynamic parameters set to the http/https url which returns an xml results |
2 | With XML data source | Pass a static value and print it on the report | Works fine. |
3 | With XML data source | Create a SQL command WITHOUT any parameters passed from main report | Works fine |
4 | With XML data source | Create a SQL command WITH a dynamic parameter passed from main report | Works fine |
5 | With XML data source | Create a xml data source WITHOUT any parameters passed from main report | Failed with "Missing Parameter Values" |
6 | With XML data source | Create a xml data source WITH a dynamic parameter passed from main report | Failed with "Missing Parameter Values" |
I am confused about this issue for a few days, is there any ideas or helps? many thanks!