
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) 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();