Hello,
I have created a simple report using the standalone report designer.
This report is saved as a .trdx file and located in the same folder as my binaries (I initially wanted it to be in a subfolder, but go the same error)
here is my code to generate a pdf file:
UriReportSource report = new UriReportSource();
report.Uri = "KiwixInterventionSheetActions.trdx";
report.Parameters.Add(new Telerik.Reporting.Parameter("CustomerId", customer_id));
ReportProcessor reportProcessor = new ReportProcessor();
File.WriteAllBytes(target_filename, reportProcessor.RenderReport("PDF", report, null).DocumentBytes);
When I do the RenderReport, I get the exception message: "Invalid URI: The format of the URI could not be determined."
If I use a different file name, I get another exception saying that the file cannot be found, so this means that the Uri is correctly interpreted at some stage.
If I use a XmLReportSource instead and fill the Xml field from the content of the file by using following code:
XmlReportSource report = new XmlReportSource();
report.Xml = File.ReadAllText("KiwixInterventionSheetActions.trdx");
then it works, but I need to be able to support UriReportSource, because my final application uses sub-reports specified as files. Whne using the XmlReportSource, the main report works, but the pdf contains identical error message for the sub reports.
Thanks in advance
Fred
I have created a simple report using the standalone report designer.
This report is saved as a .trdx file and located in the same folder as my binaries (I initially wanted it to be in a subfolder, but go the same error)
here is my code to generate a pdf file:
UriReportSource report = new UriReportSource();
report.Uri = "KiwixInterventionSheetActions.trdx";
report.Parameters.Add(new Telerik.Reporting.Parameter("CustomerId", customer_id));
ReportProcessor reportProcessor = new ReportProcessor();
File.WriteAllBytes(target_filename, reportProcessor.RenderReport("PDF", report, null).DocumentBytes);
When I do the RenderReport, I get the exception message: "Invalid URI: The format of the URI could not be determined."
If I use a different file name, I get another exception saying that the file cannot be found, so this means that the Uri is correctly interpreted at some stage.
If I use a XmLReportSource instead and fill the Xml field from the content of the file by using following code:
XmlReportSource report = new XmlReportSource();
report.Xml = File.ReadAllText("KiwixInterventionSheetActions.trdx");
then it works, but I need to be able to support UriReportSource, because my final application uses sub-reports specified as files. Whne using the XmlReportSource, the main report works, but the pdf contains identical error message for the sub reports.
Thanks in advance
Fred