File not found error on report.loadFile

Stimulsoft Reports.JS discussion
Post Reply
shahrzad
Posts: 2
Joined: Thu Jun 23, 2016 6:00 am

File not found error on report.loadFile

Post 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;
	});
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: File not found error on report.loadFile

Post by HighAley »

Hello.

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

Thank you.
shahrzad
Posts: 2
Joined: Thu Jun 23, 2016 6:00 am

Re: File not found error on report.loadFile

Post 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>
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: File not found error on report.loadFile

Post by HighAley »

Hello.

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

Thank you.
Post Reply