Page 1 of 1

Datasource not getting filled, loading xml based .mrt files

Posted: Mon Feb 22, 2016 9:55 am
by nilesh8600
Hello Stimulsoft,

We have an existing project in MVC and the stimulsoft reports with stiMvcViewer are working fine there, respected to the new request we are converting our application to Single Page App framework and for this we need to convert the StimulSoft reports so as to render those at HTML pages. I got to know on this forum that the old xml based .mrt files are supported by Reports.js, hence we have kept the .mrt files as it is and replaced the stiMvcViewer with Reports.js methods.
When I call the report.loadfile(report path), it reads most of the information as I can see debugging the report object at client side, but the datasource is not getting loaded under the dictionary.

I'm attaching the .mrt file please have a look and let me know if anything needs to be changed.

Code I'm using to render and fill the report:

Code: Select all

$scope.report = new Stimulsoft.Report.StiReport();
                $scope.report.loadFile("../../../" + reportParam.report.path);
                angular.forEach(reportParam.report.reportParams, function (rParam) {
                    if (rParam.selectParam == "y" || rParam.selectParam == "b")
                    {
                        switch (rParam.paramtype)
                        {
                            case "0":
                                $scope.report.setVariable(rParam.paramname, string.IsNullOrEmpty(rParam.value) ? "true" : rParam.value);
                                break;
                            case "11":
                                $scope.report.setVariable(rParam.paramname, rParam.value);
                                break;
                           
                            case "10":
                                //report[rParam.paramname] = form["serialParamVal"];
                                break;
                        }
                    }
                });

                $scope.report._dictionary._databases.clear();
                $scope.report._dictionary._databases.add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Conn", reportParam.connectionString));
                var options = new Stimulsoft.Viewer.StiViewerOptions;
                options.appearance.backgroundColor =
                Stimulsoft.System.Drawing.Color.dodgerBlue;
                options.toolbar.showAboutButton = false;
                options.exports.showExportToPdf = true;
                options.exports.ShowExportToWord2007 = true;
                options.toolbar.showParametersButton = false;
                var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
                viewer.report = $scope.report;
                viewer.renderHtml("viewerContent");

Re: Datasource not getting filled, loading xml based .mrt fi

Posted: Tue Feb 23, 2016 7:14 am
by HighAley
Hello.

There is a error with loading of DataSources with Parameters.
We have made an improvement.
Please, check our latest build when it will be available or let us know if you need the build earlier.

Thank you.

Re: Datasource not getting filled, loading xml based .mrt fi

Posted: Tue Feb 23, 2016 9:47 am
by nilesh8600
Hello HighAley,

Its an urgent task for us and needs to be handled as early as possible. It would be grateful if I could get the build within two days or so. Please let me know if its possible and if you think its not possible then please let me know the possible workaround till the time I get the build.

Thank you.

Re: Datasource not getting filled, loading xml based .mrt fi

Posted: Tue Feb 23, 2016 5:32 pm
by Jan
Hello,

I see your request on support. We will send patch via our ticket system.

Thank you.

Re: Datasource not getting filled, loading xml based .mrt fi

Posted: Thu Feb 25, 2016 11:33 am
by nilesh8600
Thanks Jan, Got the updated patch. Will let you know in case of any issues.

Re: Datasource not getting filled, loading xml based .mrt fi

Posted: Thu Feb 25, 2016 1:32 pm
by HighAley
Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.