how to change excel version in reportviewer using telerik

12 posts, 0 answers
  1. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 14 Jun Link to this post

    Hi sir,

     

     

                      I am using telerik report viewer in  that we need to export the report to excel with new version. how can i change this as show in below screenshot.

    http://prntscr.com/o1oehl

     

    i use this version for the Telerik.ReportViewer.WebForms.dll as show below screenshot.

     

    http://prntscr.com/o1odsx

     

     

     

     

     

  2. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    133 posts

    Posted 18 Jun Link to this post

    Hi M Kumar,

    My first suggestion is to try upgrading to the latest HTML5 Report Viewer. The latest version works with the XLSX rendering extension and ASP.NET WebForms. 

    If the option to upgrade is not available, their may be some additional configuration that is needed since the Legacy Report Viewer is being used.

    Rendering extensions can be configured using the application configuration file. More details are available in the Configure the Rendering Extensions documentation. Additionally, an example is shown in the Rendering Extensions Element documentation.

    Please let me know if you have any additional questions. Thank you for choosing Telerik Reporting.

    Regards,

    Eric R
    Progress Telerik
    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. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 20 Jun Link to this post

    hi,

       Thanks for ur reply as per suggestion i put the "Telerik.ReportViewer.Html5.WebForms.dll" and create the new page and from the tool i draw the reportviewer.

     In config also add 

    http://prntscr.com/o4ba4i

    and also i add the this setting also

    http://prntscr.com/o4baqp

    http://prntscr.com/o4bb2e

    but no xlsx format show.

  4. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    133 posts

    Posted 24 Jun Link to this post

    Hi M Kumar,

    Thank you for providing the screenshots. It looks like you would like to upgrade to the HTML5 version which is the recommended approach. I was able to replicate this same issue and found that this can be caused by a missing DocumentFormat.OpenXml.dll reference. You can install the required package using NuGet as seen in the screenshot below.




    Additionally, this will add the dependentAssembly entry in the web.config as shown in the following code snippet.

    <dependentAssembly>
      <assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="8fb06cb64d019a17" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-2.9.1.0" newVersion="2.9.1.0" />
    </dependentAssembly>


    Lastly, I have attached a working ASP.NET WebForms example with the Reporting REST Service and a Sample Report. 

    Please let me know if you have any additional issues with getting the XLSX export feature configured. Thank you for choosing Telerik.


    Regards,

    Eric R
    Progress Telerik
    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
  5. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 24 Jun Link to this post

    Hi Eric R

     

                Thanks for ur reply i update " DocumentFormat.OpenXml.dll "reference. using NuGet package even though i did not get XLSX format.

    telerik report html5 version show below screenshot

    http://prntscr.com/o68rzz

    i add this value in config also

    http://prntscr.com/o68rdu

    DocumentFormat.OpenXml.dll also add in bin folder

    http://prntscr.com/o68rll

    but no new format show 

    http://prntscr.com/o68sp0

     

     

  6. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    133 posts

    Posted 26 Jun Link to this post

    Hi M Kumar,

    From you screenshots, I was able to build a working sample project for you and attached it to this thread. It includes the export to XLSX feature but I had to make specific changes to the project. Because this is using a Web Site project the assemblies need to be exact. I recommend carefully comparing the attached sample and your project for any discrepancies. Below are the items to pay close attention to. 

    Required Assembly References
    Ensure the required assemblies are installed.

    Telerik.ReportViewer.WebForms.dll
    Telerik.Reporting.OpenXmlRendering.dll
    DocumentFormat.OpenXml.dll

    Note that the legacy report viewer does not need the Telerik.ReportViewer.Html5.WebForms.dll. This can safely be removed.

    Required Configuration (web.config)
    Locate the assemblies node in the configuration file and ensure it looks like below. 

    <assemblies>
      <add assembly="Telerik.Reporting.Adomd, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.Reporting.Cache.Database, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.Reporting.Cache.StackExchangeRedis, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.Reporting, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.Reporting.XpsRendering, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.ReportViewer.WebForms, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
      <add assembly="Telerik.Reporting.OpenXmlRendering, Version=11.1.17.614, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>       
      <add assembly="DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </assemblies>

    More detailed information is available in the Missing DOCX, XLSX, PPTX, XPS Export Options KB article.

    Please give this a try and let me know the results. If this doesn't work, please provide a screenshot of your project references and the assemblies node of your configuration file. Thank you and I look forward to your reply.

    Regards,

    Eric R
    Progress Telerik
    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
  7. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 27 Jun Link to this post

    Hi Eric R

         Thanks for reply i run ur project but it the error like this.

    http://prntscr.com/o79szh

    I add the reference Assembly above u yellow mark

    http://prntscr.com/o79qs6

    in bin folder

    http://prntscr.com/o79rw5

    http://prntscr.com/o79s74

     

    and add this also 

    http://prntscr.com/o79she

     

    Pls rectify this ASAP

  8. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    133 posts

    Posted 27 Jun Link to this post

    Hi M Kumar,

    There seems to be a number of different issues happening here. This appears to stem from different Report Viewer versions and the export to XLSX issue is from missing assemblies. Let's review the error and using the correct report viewer.

    The error on the page is indicating that the Report Viewer in use is the HTML5 version. However, from export to xlsx screenshot, the obsolete report viewer is in use. Below are two screenshots showing the network calls and the styling. Note that the Legacy Report Viewer doesn't make a network call to the api/reports endpoint.

    HTML5 Report Viewer




    Legacy Report Viewer




    At this point, it is difficult to troubleshoot this issue without seeing the actual code and the screenshots haven't been sufficient to grasp the whole scenario. If you conform that you can provide your project, I can give you the ability to attach it to the thread. This way, I can troubleshoot more thoroughly.

    Ultimately, there isn't much I can do other than review your code as I have already provided working samples that show how to use both Report Viewers. Please let me know if you can provide your project. Thank you and I look forward to your reply.

    Regards,

    Eric R
    Progress Telerik
    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
  9. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 02 Jul Link to this post

    Hi Eric R

     

                      Thank's for ur reply i download ur sample second one u send that one i run in my system it show latest version of excel but same thing i do in  my project it does not latest version it show old version. I send my project with code. pls check and reply

    Sample Project that i try:

     

    https://www.dropbox.com/s/dftobelnmhpwxz3/teleriksamp.rar?dl=0

     

  10. Todor
    Admin
    Todor avatar
    332 posts

    Posted 04 Jul Link to this post

    Hello M Kumar,

    In the provided project the DocumentFormat.OpenXml.dll that is referred is version 2.9.1.0, which PublicKeyToken is 8fb06cb64d019a17.

    Our Telerik.Reporting.OpenXmlRendering assembly uses DocumentFormat.OpenXml.dll with version 2.0.5022.0 and PublicKeyToken 31bf3856ad364e35. Note the different PublicKeyTokens, which makes impossible to use for example BindingRedirects to refer newer DocumentFormat.OpenXml.dlls. You will need to :

     1. Replace the current DocumentFormat.OpenXml.dll with an older one (e.g. version 2.0.5022.0) with PublicKeyToken 31bf3856ad364e35.


     2. Replace the following line in the Web.config :

    <add assembly="DocumentFormat.OpenXml, Version=2.9.1.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17"/>

    with this  :

    <add assembly="DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    Regards,
    Todor
    Progress Telerik
    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
  11. M Kumar
    M Kumar avatar
    77 posts
    Member since:
    Apr 2008

    Posted 25 Jul in reply to Todor Link to this post

    Hi, Thanks , its work, but after export to excel , row and column divider missing , i mean there is no cell border, it look like plain , but when we click column and row it will move like cells, we need border in each cell.

    Without borders :  http://prntscr.com/ok772w
    we need with borders  like this: http://prntscr.com/ok781r

    Thanks
  12. Todor
    Admin
    Todor avatar
    332 posts

    Posted 30 Jul Link to this post

    Hello M Kumar,

    When the report items in the report have borders, they will appear with borders also in Excel rendering. This behavior is by design, as the Reporting engine tries to reproduce as much of the original report as possible regarding layout and styling.
    If you need borders, you should add them to the corresponding report items/sections.

    Regards,
    Todor
    Progress Telerik
    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