Render stimulsoft silverlight reports in HTML5 web page

Stimulsoft Reports.Silverlight discussion
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

We are using Stimulsoft 2015.3.0.0 Silverlight-based report functionality in our application.
We have existing reports which are designed using stimulsoft silverlight flavour , now the requirement is to render Silverlight-based reports on HTML5 pages
We use Internet Explorer with silverlight plug-in, with the same setup, is it possible somehow to render Stimulsoft silverlight reports in HTML5

Regards,
Vani
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by Alex K. »

Hello,

In this case, you need to use the HTML5 viewer from Reports.Web product.

Thank you.
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

Hi,
I have stimulsoft ultimate edition trial version installed. I am doing R & D on this.
I am unable to understand difference between Reports.Web and Reports.JS.
We have angular js + html5 application where in we want to render this existing report
Which is the best fix product flavour for this? We have silverlight flavour license already.

I have an existing silverlight report which has buisness objects as data source, i saved that to .mrt file.
var report = new StiReport();
report.Load(_reportTemplateRevision.Blob);
// populate data in business objects
report.SaveToJson(@"C:\savedReport.mrt");

When i Open this in Designer For JS, it shows report but the data is not populated , it just shows the template with business object properties. The .mrt file has data but that is not rendered

How can I render this report is viewer? I am just finding best fit for this requirement.
We cannot design the reports in HTML5 designer, hence we have to use existing silverlight report
I have attached sample mrt file , please help me render it in html5
Attachments
savedReport.mrt
(1.36 MiB) Downloaded 276 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by Alex K. »

Hello,

In this case, you need to render your report and the send to the HTML5 viewer:
var report = new StiReport();
report.Load(_reportTemplateRevision.Blob);
// populate data in business objects
report.Render();
report.SaveDocument("report.mdc"); // - In this case, you get the rendered report which you can open in HTML5 viwer.

Thank you.
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

I am unable to understand difference between Reports.Web and Reports.JS.
We have angular js + html5 application where in we want to render this existing report
Which is the best fix product flavour for this? We have silverlight flavour license already.
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

Adding to previous query , i could get report.mdc file out of silverlight report
But i could not find sample app to load mdc file in html 5
Rather many examples are with mrt files
Also when trying to load file from designer throws error , i tried Designer for JS and Designer
In asp.net mvc sample app it worked

StiReport report = new StiReport();
report.LoadDocument(Server.MapPath("~/Content/Reports/report.mdc"));
StiMvcViewer.GetReportSnapshotResult(report);

Please share sample code to load mdc file in html5
Attaching the mdc file here with.
also answer my previous query
Attachments
report.mdc
(201.12 KiB) Downloaded 397 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by Alex K. »

Hello,

Please check the "Using Viewer" sample.

Thank you.
Attachments
Capture.PNG
Capture.PNG (98.41 KiB) Viewed 5346 times
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

Please read my post carefully. We are interested in rending this report on HTML5 .
Example you shared is of asp.net mvc app
Please share sample code to load mdc file in html5 , we dont want to use StiMvcViewer
How can i use that in angular +html5?
In sample angular js application, i tried loading mdc file, but the formatting gets disturbed.
Please try loading mdc file in angular sample app, observe difference in formatting
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by Alex K. »

Hello,

You can use the same method LoadDocument() in JS before send it to viewer.

Thank you.
vani.kulkarni
Posts: 27
Joined: Thu Jun 02, 2016 7:22 am

Re: Render stimulsoft silverlight reports in HTML5 web page

Post by vani.kulkarni »

that does not work, there is nos such function

angular.min.js:107 TypeError: report.LoadDocument is not a function
at new <anonymous> (mainctrl.js:16)
at Object.e [as invoke] (angular.min.js:39)
at P.instance (angular.min.js:80)
at K (angular.min.js:61)
at h (angular.min.js:54)
at h (angular.min.js:54)
at h (angular.min.js:54)
at angular.min.js:53
at angular.min.js:20
at n.$eval (angular.min.js:132)
Locked