How can I create and export a report in the background?
I am using VB and didnt get to solve this yet. Hope somebody can help me out here.
Hello,
There are a couple of ways of doing this, here are the walkthroughs on:
How to Export a Report Programmatically Using the Report Viewer API
How to Export a Report Server Side Without the Report Viewer API
Hopefully one of these will work for you.
Regards,
Miguel.
hi Miguel Machado,
i tried How to Export a Report Programmatically Using the Report Viewer API sample code but my report is not being rendered in the viewer and an empty view is generating ,please guide me .Further more how can i genrate stream from xamdatagrid?
Ok, I'm assuming you are working with WPF, that definitionUri should work although prepending "file://" to file paths is what matches our Pack Uri notation. You can learn more about How to Reference Reports here.
The reason why the viewer is not being displayed is because of Visibility="Collapsed", this makes the viewer invisible. Notice you copied this from the export programmatically topic where no viewer is supposed to be displayed.
Have you added a button to export programmatically as explained in that topic? is that working?
Please try setting Visibility="Visible" to see the Report Viewer and let me know how it goes.
this is my code , i am not getting any error message ,how ever report is being rendered bt empty
<ig:XamReportViewer Name="xamReportViewer1" ExportCompleted="xamReportViewer1_ExportCompleted" Width="700" Height="400" Visibility="Collapsed" > <ig:XamReportViewer.RenderSettings > <ig:ClientRenderSettings DefinitionUri="E:\SampleGridReport\Views\pdfReport.igr"> </ig:ClientRenderSettings> </ig:XamReportViewer.RenderSettings> </ig:XamReportViewer>
as i hav a dense heirarchy in the project , i cant use /MyAssembly;component/MyReport.igr approach
Hi, aren't you getting an error message? can you please show me the code where you declare the report viewer and rendering settings? I'm afraid you might have a configuration error, please make sure it follows the instructions explained here: How to Configure the Report Viewer for Client or Server-Side Rendering .