Hi Edward,
I am having some inconsistent behavior. If I render the report for the first time and update report variables in the same function, let's say
Code: Select all
function a() {
//generate report for the first time
report.dictionary.variables.getByName("firm_name").valueObject = "FIRST COMPANY";
...
viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
viewer.report = report;
viewer.renderHtml("bill");
//update firm name
report.dictionary.variables.getByName("firm_name").valueObject = "SECOND COMPANY";
report.render();
}
It works fine and the company name is updated in the viewer.
HOWEVER, if I move the "update firm name" part (both two lines) in another function (event handler, when a textbox value changes for example), the viewer is NOT updated. I checked in the debugger, report dictionary is correctly updated, however it seems that report.render() has no effect.
Is there some extra step to refresh the viewer, and why it works when everything is in the same function?