Further to my questions, i don’t want to run the report from ReportViewer as my customer’s requirement is not to view the reports instead run upon button click and attached to there business object as pdf after execution and then send to printer for printing.
I have a class library project which will execute the report and at run time, build and attach the output of report as pdf with our business object(i.e. with an entity in our dynamics CRM application).
I also need to know how to specifiy input parameter through code?
Thanks for your patience.
Besides adding ReportViewer control in your application and displaying the report over the form object, you can load the .RDL file programmatically, use the same report, transform it to PDF format using Aspose.Pdf for Reporting Services, save the output and use Aspose.Pdf for .NET to print the output.
In order to specify the .RDL file which you need to convert, please try using following code lines
exportButton.Click += new
System.EventHandler((s, e) =><o:p></o:p>
// specify the path of report which you
need to render as PDF format<o:p></o:p>
reportViewer1.LocalReport.ReportPath = “c:/pdftest/local_city_SanDiego.rdl”;<o:p></o:p>
// save the output from Aspose.Pdf for
Do you have any example of achieving above?(i.e. running report from class library then building a pdf in memory which i could use then to attach with our business object)
In order to accomplish this requirement, please try using MemoryStream instead of FileStream object in RenderWithAsposePdf(…) method of project shared earlier in 496108 post.
Or am i correct that execution of report is not supported through your product in .net class library project?
Please try using the solution earlier as it explains the steps on how to load .RDL file, transform it to PDF format and then print the file.