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

Controlling Export formats in WPF Viewer

2 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen McDaniel
Top achievements
Rank 1
Stephen McDaniel asked on 21 Apr 2017, 05:50 PM

We are in the process of porting our Silverlight application to WPF.  We have run into some minor issues with the Export dropdown and I want to see if I'm missing something.

For a little context, our Silverlight and WPF app live side-by-side and we are assuming our end users are likely to be using both applications.  So we want to keep the experience between SL and WPF as close as possible.  Also, because we already have an architecture in place for the SL app, we are reusing that for the WPF app.  For example, when reports are run by the WPF app, they don't actually execute in process.  Instead, we use the Web API REST service to run the reports.  This is necessary because users of the WPF app don't actually have direct access to the database.  Only the web server has the credentials to connect to the database.

The first issue I have is controlling the order of the Export formats in the dropdown.  In the Silverlight app, we are able to control the order of the formats because we have our own IReportService implementation and have coded up the specific order in IReportService.ListRenderingExtensions().  I couldn't find a similar way to define the extensions that way in the Web API REST service.  The only way I found to control the formats was via the app.config file for the WPF app.  That works for hiding/renaming extensions but I couldn't get the 'order' property to work that is documented here: http://docs.telerik.com/reporting/configuring-telerik-reporting-extensions.

Am I doing something wrong with the order property or is there some other way to control the order?  This may seem minor, but as I mentioned our users are going to be using both applications and having the dropdowns be different could lead to confusion.  Interestingly enough, the order of the export dropdown is something that was important to our customers over 8 years ago (http://www.telerik.com/forums/order-of-export-formats-in-dropdown).

The other issue that I'm having trouble with is that it seems I need the rendering DLLs to be included in the WPF app in order for them to show up in the export dropdown.  But all the exports I'm doing are being done by the web server, right so I don't even understand why the DLLs need to be on the client.  As an example, until I included the Telerik.Reporting.OpenXmlRendering.dll included, the Word export didn't show up.  It's not a big deal but I'd rather not have to include DLLs if they aren't being used.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 25 Apr 2017, 02:04 PM
Hello Stephen,

You can use the following configuration to set the order of export options for each viewer that uses the corresponding Telerik Reporting REST Service in which configuration file we use the settings:
<configuration>
  <configSections>
    <section
        name="Telerik.Reporting"
        type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=11.0.17.406, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
        allowLocation="true"
        allowDefinition="Everywhere"/>
  </configSections>
  <Telerik.Reporting>
    <extensions>
      <render>
        <extension name="PDF" order="3">        
        </extension>
        <extension name="DOCX" order="1">
        </extension>
        <extension name="PPTX" order="2">
        </extension>
        <extension name="RTF" order="4">
        </extension>
      </render>
    </extensions>
  </Telerik.Reporting>


The attached video illustrates how we configured the test application. The video can be previewed in IE browser.

Regards,
Stef
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
0
Accepted
Stephen McDaniel
Top achievements
Rank 1
answered on 26 Apr 2017, 11:29 PM
Thanks, from comparing your sample code to mine, I noticed that we were a few versions behind.  We just upgraded to the latest version and now everything is working.  Thanks for the help!
Tags
General Discussions
Asked by
Stephen McDaniel
Top achievements
Rank 1
Answers by
Stef
Telerik team
Stephen McDaniel
Top achievements
Rank 1
Share this question
or