Thursday, March 29, 2012

Export formats

I have created report project using Business Intelligence Development Studio. When i use Preview tab or run report from Visual Studio in debug mode there is 6 formats available for export. But when i open the same report in Windows Forms based application using ReportViewer control there is only 2 export formats: PDF and Excel. How can i configure ReportViewer control to show all export formats?

I do not know what "Windows Forms based application" you are using, but the list of available formats is in rsReportServer.config in the <Render> section. You should see about 10 <Extension Name> entries. This tag has a 'Visible' attribute that can hide extensions (Visible="false"). This is how our custom viewer determines what is available.

Also note that the server returns these in the order that they are in the config file, so you can arrange them here. And, the first item will be the default.

Scotteb

|||

The report viewer controls are limited to PDF and Excel:

http://msdn2.microsoft.com/en-us/library/ms345248.aspx

http://msdn2.microsoft.com/en-us/library/ms251771.aspx

Thanks, Donovan.

|||

Igor,

Is your Windows Forms application configured to use the ReportViewer control in local mode, or in server mode?

ReportViewer control in local mode (where your report is in .rdlc file in the application project, and your application doesn't connect to the Reporting Services server) has only PDF and Excel renderers. They are built into the control itself.

If you want to use renderers from the report server, you would have to use the control in server mode, publishing the report to the Reporting Services server and changing data binding as appropriate.

|||

Donovan Smith - MS wrote:

The report viewer controls are limited to PDF and Excel:

http://msdn2.microsoft.com/en-us/library/ms345248.aspx

http://msdn2.microsoft.com/en-us/library/ms251771.aspx

OK, i have read something like that. But Microsoft's RSReportHost.exe use the same ReportViewer control and has 6 formats available.

|||

Denis Levin MSFT wrote:

Is your Windows Forms application configured to use the ReportViewer control in local mode, or in server mode?

ReportViewer control in local mode (where your report is in .rdlc file in the application project, and your application doesn't connect to the Reporting Services server) has only PDF and Excel renderers. They are built into the control itself.

If you want to use renderers from the report server, you would have to use the control in server mode, publishing the report to the Reporting Services server and changing data binding as appropriate.

ReportViewer control in my application is configured to use server mode. And report is on server.

|||

scotteb wrote:

I do not know what "Windows Forms based application" you are using, but the list of available formats is in rsReportServer.config in the <Render> section. You should see about 10 <Extension Name> entries. This tag has a 'Visible' attribute that can hide extensions (Visible="false"). This is how our custom viewer determines what is available.

My <Render> section looks like this:

<Render>

<Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.XmlDataRenderer.XmlDataReport,Microsoft.ReportingServices.XmlRendering"/>

<Extension Name="NULL" Type="Microsoft.ReportingServices.Rendering.NullRenderer.NullReport,Microsoft.ReportingServices.NullRendering" Visible="false"/>

<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering"/>

<Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering"/>

<Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PdfReport,Microsoft.ReportingServices.ImageRendering"/>

<Extension Name="RGDI" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.RemoteGdiReport,Microsoft.ReportingServices.ImageRendering" Visible="false" LogAllExecutionRequests="false"/>

<Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" LogAllExecutionRequests="false"/>

<Extension Name="HTML3.2" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html32RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false"/>

<Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering"/>

<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering"/>

</Render>

As you can see XML, CSV, IMAGE and MHTML formats are not disabled. And they are indeed available when report is rendered by Microsoft's RSReportHost.exe. But in my own application ReportViewer control shows only Excel and PDF.

|||

Just to troubleshoot the issue, can you render the report in Report Manager (http://localhost/Reports) on the server, and check which rendering extensions are available in the server's Export drop-down box.

Thanks

|||

Denis Levin MSFT wrote:

Just to troubleshoot the issue, can you render the report in Report Manager (http://localhost/Reports) on the server, and check which rendering extensions are available in the server's Export drop-down box.

Server's drop-down box is also limited to PDF and Excel formats. Is this limitation of reporting services in SQL Server 2005 express edition?

|||

Yes. Export on SQL2005 Express Edition is limited to PDF and Excel.

Thanks, Donovan

sql

No comments:

Post a Comment