Report in .NET Core not inheriting export device information settings

6 posts, 0 answers
  1. Joshua
    Joshua avatar
    3 posts
    Member since:
    Oct 2016

    Posted 07 Nov Link to this post

    Hi,

     

    I'm trying out Telerik Reporting for .NET Core and I'm having an issue configuring the export device settings for CSV I've added the app.config file specified at the bottom of: http://docs.telerik.com/reporting/html5-report-viewer-asp-net-core

     

    This app.config is being picked up by the program because it allowed me to input the connection string and run up the report.

     

    After this I tried adding in extension settings as detailed in your support blog: http://www.telerik.com/support/kb/reporting/details/configuring-the-csv-rendering-extension

     

    My implementation is below: 

    <configuration>
      <configSections>
        <section
                name="Telerik.Reporting"
                type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=10.2.16.914, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
                allowLocation="true"
                allowDefinition="Everywhere"/>
      </configSections>
     
      <Telerik.Reporting>
        <Extensions>
          <Render>
            <Extension name="CSV">
              <Parameters>
                <Parameter name="NoHeader" value="true"/>
                <Parameter name="NoStaticText" value="true"/>
              </Parameters>
            </Extension>
          </Render>
        </Extensions>
      </Telerik.Reporting>
     
      <connectionStrings>
        <add name="XXX" connectionString="XXX security=True;MultipleActiveResultSets=True;App=EntityFramework;Asynchronous Processing=true" providerName="System.Data.SqlClient" />
      </connectionStrings>
    </configuration>

     

    I'm wondering if:

    1. This implementation still works for .NET Core (I assume it does because the connection string does.)
    2. If you can see any issues with my above code.
    3. Where do these settings actually get pushed in to the report viewer template, I've searched through all the related code I can find and can't find any references to the export settings.

    Thanks,

    Josh

  2. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 09 Nov Link to this post

    Hello Josh,

    The usage of an app.config is a hack allowing the ConfigurationManager in the reporting engine to find the connection string. Yet custom Telerik.Reporting section cannot be read from the old config files.

    We can suggest you to hide the default export options via CSS on the page, and to use custom UI to export. The UI can be loaded with export options you want per report. the viewer's API is exposed and the UI can be bound to it - commands and data attributes.


    I hope this helps.

    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
  3. DevCraft banner
  4. Joshua
    Joshua avatar
    3 posts
    Member since:
    Oct 2016

    Posted 23 Nov in reply to Stef Link to this post

    Hi Stef,

     

    Does that mean that the configuration settings for using user functions under the guide: http://docs.telerik.com/reporting/standalone-report-designer-extending-configuration

    do not work? Is there currently a workaround for .Net Core to allow user functions?

     

  5. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 24 Nov Link to this post

    Hi Joshua,

    The custom Telerik.Reporting section cannot be read, and all settings like external assemblies, extensions settings will not be taken into consideration.

    The workarounds:
    1. For export options:
      Modify the viewer's HTML template or use CSS and Javascript to hide the default export options. Then use the HTML5 Viewers commands and data attributes via custom UI;
    2. For external assemblies:
      1. If the report is configured to use an external assembly to access data, you can create a custom resolver for the Reporting REST service and change the Data items' DataSource properties at run-time. Consider the example of a custom resolver here.
      2. If the report uses custom functions, you can use a custom resolver to find the items and update their properties with already calculated values.
        Or you can bind the report to a custom data object. Add properties to the data object which return the required values (previously set via user functions). A plus of using data models is the access to the raw type and its methods as well - Work with raw data type's methods and properties.
        In order to provide you more accurate suggestions, please let us know more details about the usage of custom functions in the report


    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
  6. Joshua
    Joshua avatar
    3 posts
    Member since:
    Oct 2016

    Posted 24 Nov in reply to Stef Link to this post

    Hi Stef,

     

    Generally in the past we have used custom report functions to do a few things, mainly changing the displayed values on the report (ie. a boolean to a string depending on the value) and formatting values (which is partly fixed by Teleriks formatting options, but we have some odd formats we need to use on reports which will require custom functionality.

     

    Though, we will be updating all of our reports and therefore look to using more varied custom functions as the need arises.

  7. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 25 Nov Link to this post

    Hi Joshua,

    Please check if the built-in functions help you to replace the custom code:
    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
Back to Top
DevCraft banner