Datasource not getting filled, loading xml based .mrt files

Stimulsoft Reports.JS discussion
Post Reply
nilesh8600
Posts: 19
Joined: Tue Feb 16, 2016 10:16 am

Datasource not getting filled, loading xml based .mrt files

Post 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");
Attachments
glbalsh3.mrt
xml based .mrt file
(24.3 KiB) Downloaded 334 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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.
nilesh8600
Posts: 19
Joined: Tue Feb 16, 2016 10:16 am

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

Post 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.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

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

Post by Jan »

Hello,

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

Thank you.
nilesh8600
Posts: 19
Joined: Tue Feb 16, 2016 10:16 am

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

Post by nilesh8600 »

Thanks Jan, Got the updated patch. Will let you know in case of any issues.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post by HighAley »

Hello.

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

Thank you.
Post Reply