Page 1 of 1

File not found error on report.loadFile

Posted: Thu Jun 23, 2016 6:43 am
by shahrzad
Hello,
i used report.js and i have one mrt file in reports folder that is at root. i can show viewer but i have error that File not found.

Code: Select all

	$(document).ready(function () {
		var options = new Stimulsoft.Viewer.StiViewerOptions();
		options.height = "100%";
		options.appearance.scrollbarsMode = true;

		var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);

		viewer.renderHtml("viewerContent");

		var report = new Stimulsoft.Report.StiReport();
		report.loadFile("~/reports/WealthListReport.mrt"); // File not Found error
		report.render();
		viewer.report = report;
	});

Re: File not found error on report.loadFile

Posted: Thu Jun 23, 2016 11:33 am
by HighAley
Hello.

It's possible to see your issue via TeamViewer.
Please, write us to support@stimulsoft.com.

Thank you.

Re: File not found error on report.loadFile

Posted: Sat Jun 25, 2016 7:05 am
by shahrzad
my problem fixed by adding this code to web.config

Code: Select all

<system.webServer>
		<staticContent>
			<remove fileExtension=".json" />
			<mimeMap fileExtension=".json" mimeType="application/json" />
			<mimeMap fileExtension=".mrt" mimeType="application/json" />
		</staticContent>
	</system.webServer>

Re: File not found error on report.loadFile

Posted: Mon Jun 27, 2016 6:06 am
by HighAley
Hello.

Thank you for the solution.
Let us know if you need our help.

Thank you.