Page 1 of 1

Report is blank if I move .mrt to a different path

Posted: Tue Nov 22, 2022 11:45 pm
by bradlymathews
I am playing with the Javascript samples from GitHub.

I have the Showing the Viewer Immediately after Running an App sample working and I changed it to load a JSON data source. However when I change the path to the mrt file, the report no longer displays.

Code: Select all

        var viewer = new Stimulsoft.Viewer.StiViewer();
	var report = new Stimulsoft.Report.StiReport();
	//report.loadFile("../reports/SimpleList.mrt");  // This works
        report.loadFile("https://**************.blob.core.windows.net/public-url/SimpleList.mrt"); // This shows blank page.
        report.dictionary.databases.clear();
        var dataSet = new Stimulsoft.System.Data.DataSet("Demo");
        dataSet.readJson(data);
        report.regData("Demo", "Demo", dataSet);
	viewer.report = report;

Re: Report is blank if I move .mrt to a different path

Posted: Wed Nov 23, 2022 9:44 am
by Lech Kulikowski
Hello,

Please send us a sample with test data that reproduces the issue for analysis.

Thank you.

Re: Report is blank if I move .mrt to a different path

Posted: Wed Nov 23, 2022 6:08 pm
by bradlymathews
Here is a ZIP file with what is needed to reproduce. The /WorkingwithViewer/StimulsoftTest.html file is the one to run.

It works as it is now, but remove comment from the

Code: Select all

loadFile
with the full URL and it stops working.

Thanks.

Re: Report is blank if I move .mrt to a different path

Posted: Wed Nov 23, 2022 7:40 pm
by bradlymathews
I fixed it - it was a CORS issue, but it was not giving me a CORS error.

I changed CORS settings to my Azure BLOB service and it is happy now.

Re: Report is blank if I move .mrt to a different path

Posted: Thu Nov 24, 2022 7:07 am
by Max Shamanov
Hello,

You are welcome!