Export with wrong file name extension on JSViewer

Posted by: michael.zhong on 4 January 2021, 2:34 am EST

    • Post Options:
    • Link

    Posted 4 January 2021, 2:34 am EST

    I deploy a activereport service on my IIS server, and I run the report named ‘1.rdlx’ on ERP system, all is fine. But when export to PDF file, It download the file named ‘1.rdlx’. I checked the file yet, it is a PDF file actually. Can anybody give me some advise? Thanks.

  • Posted 4 January 2021, 2:47 pm EST

    Hello Michael,

    This issue occurs because of restriction to access response headers when using Fetch API (which we use to download the exported file) over CORS. You can use the following CORS policy to avoid this issue:

    HttpContext.Current.Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition")
    
    

    Hope it helps.

    Thanks,

    Mohit

  • Posted 4 January 2021, 4:00 pm EST

    Hi Mohit,

    Got it and it’s OK, thanks a lot.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels