This is a migrated thread and some comments may be shown as answers.

Choose default export type

4 Answers 136 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gilgen
Top achievements
Rank 1
Gilgen asked on 23 May 2011, 09:09 AM
Hi,

I'd like to know if there is a way to choose the default export type selected. Indeed, i restricted the export to the PDF export only and I want to select it by default.

Thanks in advance

Jonathan

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 25 May 2011, 02:21 PM
Hi Jonathan,

Currently it is not possible to have a predefined/preselected export format, which however makes sense and it is logged on as a feature request. For the time being you can hide the export combobox and button by setting the viewer's ShowExportGroup property to false. You can then handle the export by yourself through external UI, which would allow only export to PDF (more info here).

Kind regards,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Travis
Top achievements
Rank 1
answered on 31 Oct 2011, 04:25 PM
You can achieve this with a bit of jquery after the viewer has been displayed: 

$('[id*="ReportToolbar_ExportGr_FormatList_DropDownList"]')[0].selectedIndex = (index of the default option you want);
0
Guru
Top achievements
Rank 2
answered on 30 Dec 2014, 05:44 PM
Has this been updated? I'm curious if a default export type can be set on the latest version of the ReportViewer for wpf? I would prefer to go with a custom UI, but due to the ReportViewerModel being hidden with that latest update I was forced to rethink this approach. As it currently stands I cannot access the page controls (moveToNextPage, moveToLastPage, etc..) from outside of the template. So, in order to have a nice UI that is based around a single toolbar I need to be able to work with the template provided for the ReportViewer. I am implementing my own dialog for exporting with different options. Similar to what you have linked to above I have been able to setup an export for my reports and I can easily present this to the user by subscribing to the ExportBegin event and stopping the default.  I would like to be able to modify the template to allow the user to click a button rather than the provided drop-down. Yet, the ReportViewerModel seems to only be able to work with a drop-down's selection.  I'm looking for a way to set and trigger a default export form a button click in wpf.
0
Stef
Telerik team
answered on 02 Jan 2015, 09:09 AM
Hello Zack,

Please check my post in the Custom Toolbar (ReportModelViewer missing) forum thread. I believe that using the ReportProcessor and custom UI will allow you to accomplish the task.

If you need further help, let us continue the discussion in the above linked thread.


Thank you for your understanding.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Gilgen
Top achievements
Rank 1
Answers by
Steve
Telerik team
Travis
Top achievements
Rank 1
Guru
Top achievements
Rank 2
Stef
Telerik team
Share this question
or