c# - Printing Telerik reports using ReportProcessor class -


firstly let me describe setup.

i have rest telerik reporting service. service operates trdx file (have requirement have reports in template format). have console application, periodically started windows service. console application uses reportprocessor class print reports directly printer.

now problem.

reportprocessor throws exception when trying access reports using urireportsource, when these report files hosted in iis rest reporting service. browsing , anonymous authentication enabled on iis reports folder. error that's thrown is:

the remote server returned error: (404) not found.

however reports printed when trdx files located in same folder console application.

solved own question trial , error.

my reports located in rest service's subdirectory. trying set uri reports url this:

urireportsource reportsource = new urireportsource {      uri = "http://localhost/mytelerikrestservice/reports/samplereport.trdx"  }; 

and getting 404 error since request path handled service.

trying specify physical path (c:\inetpub\wwwroot\mytelerikservice\reports\samplereport.trdx) ended in error: the path format not supported.

finally i've tried uri: /inetpub/wwwroot/mytelerikservice/reports/samplereport.trdx, maps physical location.

and worked!

edit:

i should've read https://www.w3.org/addressing/url/uri-spec.html before working on issue. apparently had no firm understanding of uri is! feeling dumb now.....


Comments