web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to export report automatically to word?

(0) ShareShare
ReportReport
Posted on by 6,480

Hello,

is it possible to export the report automatically to word file directly from code to have a same file as we are getting from save as "word". See screenshot below please:

word.png

I saw some examples of code but "SRSReportFileFormat::" does not have word option.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I am afraid Word is not a supported direct export format, as per the Enum:

    msdn.microsoft.com/.../srsreportfileformat.aspx

    You could try to use cross-references to see where the enum is being used in the SRS/Report classes, to see if you could add support for it. However, it is possible that the support comes from the AX kernel, or a pre-compiled DLL, in which case you would not be able to modify it.

    An alternate solution could be to write a C# wrapper for AX around a free PDF->Word converter, export your report to PDF then convert it to Word - problem solved.

  • Johnny Profile Picture
    6,480 on at

    Hi Vilmos,

    thanks for reply.

    I was thinking maybe I can use the code that is running behind the "Save as --> Word" from SSRS report.

    Do you know how can I see it?

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    The report is displayed in the SrsReportViewer, which has a managed host controller (custom .Net form control).

    Microsoft.Dynamics.AX.Frameworks.Controls.ReportViewer.AxReportViewer

    It is just responsible for rendering the SSRS report, I do not think you can directly call that.

    The only viable approach I could think of is the PDF->Word conversion.

    Another option could be is to run the report not through the AX reporting framework, but from the .Net namespace, and that way you could construct something directly to tell SSRS that you want Word format, since it is supported on the other side, just not implemented in AX.

  • Vilmos Kintera Profile Picture
    46,149 on at

    If the answer was helpful, please make sure you mark it as Verified on the right hand side, thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans