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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

WinForm.ReportViewer in Dynamics AX 2012

(0) ShareShare
ReportReport
Posted on by 25

Hi!

I am new in Dynamics AX and programming.

So i have some problem with embedding SSRS remote report into DAX.

How i did it in Visual Studio:

- Created Empty winform

- using Microsoft.Reporting.WinForms;

- In Form1_Load

ReportViewer rep = new ReportViewer();
this.Controls.Add(rep);
rep.Dock = DockStyle.Fill;
Uri uri = new Uri("http://myURL/ReportServer");
rep.ProcessingMode = ProcessingMode.Remote;
rep.ServerReport.ReportServerUrl = uri;
rep.ServerReport.ReportPath = "/MyReport";
rep.RefreshReport();

-Easy and works perfectly!

But in Dynamics..

- Created reference to Microsoft.Reporting.WinForms.ReportViewer

- Created Form in AOT, created ManagetHost in form>Design and linked it to Microsoft.Reporting.WinForms.ReportViewer

In init method:

Microsoft.Reporting.WinForms.ReportViewer myReportViewer = new Microsoft.Reporting.WinForms.ReportViewer();
Microsoft.Reporting.WinForms.ServerReport myServerReport = new Microsoft.Reporting.WinForms.ServerReport();

Microsoft.Reporting.WinForms.ProcessingMode ProcessingMode = ClrInterop::parseClrEnum("Microsoft.Reporting.WinForms.ProcessingMode", "Remote");

System.Uri serveruri = new System.Uri("http://ServerURL/ReportServer");

super();


myReportViewer.set_ProcessingMode(ProcessingMode);
myServerReport.set_ReportServerUrl(serveruri);
myServerReport.set_ReportPath("/MyReport");

myReportViewer = Viewer.control() as Microsoft.Reporting.WinForms.ReportViewer;
//Here must be something that bypass ReportServerURL and ReportPath to ReportViewer
myReportViewer.RefreshReport();

 

And i cant understand how to bypass ReportServerUrl and ReportPath to ReportViewer, as ReportViewer has no such properties.

Or maybe there is another good ways to embed report into DAX?

Tried WebBrowser.Navigate(url) - not good, throws javascript errors;

Awesomium SDK - works fine, but have issues with pdf.js

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aleksandr Sh Profile Picture
    25 on at

       Microsoft.Reporting.WinForms.ReportViewer myReportViewer = new Microsoft.Reporting.WinForms.ReportViewer();
       Microsoft.Reporting.WinForms.ServerReport myServerReport;
       
       Microsoft.Reporting.WinForms.ProcessingMode ProcessingMode = ClrInterop::parseClrEnum("Microsoft.Reporting.WinForms.ProcessingMode", "Remote");

       System.Uri serveruri = new System.Uri("http://dax-report/ReportServer");

       super();
       
       myReportViewer = Viewer.control();
        
       myReportViewer.set_ProcessingMode(ProcessingMode);
        
       myServerReport = myReportViewer.get_ServerReport();
        
       myServerReport.set_ReportServerUrl(serveruri);
       myServerReport.set_ReportPath("/url/Report");   
        
       myReportViewer.RefreshReport();

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans