reza
reza

Reputation: 11

StimulSoft does not load the report file when I use report.loadFile(Filepath)

i use stimulsoft in javascript.But the viewer can not display the desired project when loaded

var report = new Stimulsoft.Report.StiReport();
     
    report.loadFile("~/Source/SimpleList.mrt"); 
  
    var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false); viewer.renderHtml("content");  

    viewer.report = report;

but after load viewer when click open button in stimulsoft and open the file, Now the desired report is loaded!

Please help me to understand why the mentioned report is not displayed when loading the page

Upvotes: 0

Views: 649

Answers (1)

Jini
Jini

Reputation: 1

I think you missed the render method

viewer.renderHtml();

Please see this sample file:

https://github.com/stimulsoft/Samples-JS/blob/master/JavaScript/Working%20with%20Viewer/Assigning%20a%20Report%20to%20the%20Viewer.html

Upvotes: 0

Related Questions