Post Render events

Posted by: atalati on 3 August 2017, 3:21 pm EST

  • Posted 3 August 2017, 3:21 pm EST

    Is there any way I can programmatically redirect the user when they
    export to HTML And/Or PDF and I can let them modify that HTML And/Or PDF file in browser ?

    What I am exactly looking for here is the way ...

      I can store it on hard drive automatically without promoting And letting the user know where it is actually saving.( I have prepared a utility for converting HTML / PDF to DOC files using other libraries )

      And redirecting the user to my that utility page automatically so the user sees the Word directly.

  • Replied 3 August 2017, 3:21 pm EST

    Anyone ?
  • Replied 3 August 2017, 3:21 pm EST


    The export functionality provided using the export buttons is handled internally and there is not a way to override the same. You can create a customized toolbar and provide your options for export which handle the export according to the coding you performed for the same. Please refer to the following link that describes how you can create a custom toolbar:


    Once you are done with the same, you can render the report progamatically to a MemoryStream and later redirect that stream to the browser to open the Word for you to edit the file in the browser. Please have a look at the following code:

    pre { font-family: "Liberation Serif"; }p { margin-bottom: 0.21cm; }

     DataDynamics.Reports.ReportDefinition _reportDef = new DataDynamics.Reports.ReportDefinition(new System.IO.FileInfo(@"C:\Users\stduser\Desktop\New folder\SampleReport.rdlx"));
    DataDynamics.Reports.ReportRuntime _reportRuntime = new DataDynamics.Reports.ReportRuntime(_reportDef);

    DataDynamics.Reports.Rendering.Word.WordRenderingExtension _renderingExtension = new DataDynamics.Reports.Rendering.Word.WordRenderingExtension();
    DataDynamics.Reports.Rendering.IO.MemoryStreamProvider _provider = new DataDynamics.Reports.Rendering.IO.MemoryStreamProvider();

    _reportRuntime.Render(_renderingExtension, _provider);

    MemoryStream _ms = _provider.GetPrimaryStream().OpenStream() as MemoryStream;
    _ms.Position = 0;
    Response.ContentType = "text/doc";
    Response.AddHeader("content-disposition", "attachment; filename=MyDOC.doc");

    Hope it will help you. Please let me know if I missed something or if you have any queries further.

    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels