Page 1 of 1

Report variables missing in rendering NET 6 Angular

Posted: Wed Jun 05, 2024 11:42 am
by mgomez
Hello everyone,

using a net 6.0 app, StiAngularViewer component, Nuget Package Stimulsoft.Reports.Angular.NetCore 2024.2.6

in a net 6 app loading the report attached which contains two variables/parameters
designer render.jpg
designer render.jpg (66.27 KiB) Viewed 4562 times
and sending it to an Angular frontend, the report is well rendered but the parameter button is disabled so the variables are not shown
Angular render.jpg
Angular render.jpg (94.97 KiB) Viewed 4562 times
Please could you help me with this?

Thanks in advance
Regards

Re: Report variables missing in rendering NET 6 Angular

Posted: Wed Jun 05, 2024 12:49 pm
by Lech Kulikowski
Hello,

How do you send it in the viewer?

Thank you.

Re: Report variables missing in rendering NET 6 Angular

Posted: Wed Jun 05, 2024 1:00 pm
by mgomez
Hello Lech, the used controllers are the following:

Code: Select all

 
         // <summary>
        /// InitViewer
        /// </summary>
        /// <returns>IActionResult</returns>
        [HttpPost("init-viewer")]
        [AllowAnonymous]
        public IActionResult InitViewer()
        {
            var requestParams = StiAngularViewer.GetRequestParams(this);

            var options = new StiAngularViewerOptions();
            options.Actions.ViewerEvent = "viewer-event";
            options.Actions.GetReport = "get-report";
            options.Appearance.ScrollbarsMode = true;

            return StiAngularViewer.ViewerDataResult(requestParams, options);
        }


        [HttpPost("viewer-event")]
        [AllowAnonymous]
        public IActionResult ViewerEvent()
        {
            return StiAngularViewer.ViewerEventResult(this);
        }

        /// <summary>
        /// Chargement initial du rapport
        /// </summary>
        /// <returns>IActionResult</returns>
        [HttpPost("get-report")]
        [AllowAnonymous]
        public async Task<IActionResult> GetReport()
        {
            var report = StiReport.CreateNewReport();

            var path = StiAngularHelper.MapPath(this, $"Reports/ParametersDependentParameter.mrt");
            report.Load(path);

            return StiAngularViewer.GetReportResult(this, report);
        }
        
Thanks

Re: Report variables missing in rendering NET 6 Angular

Posted: Thu Jun 06, 2024 8:35 am
by Vadim
Hello.

Can't reproduce, can you send us simple project that can reproduce problem?

Re: Report variables missing in rendering NET 6 Angular

Posted: Thu Jun 06, 2024 10:50 am
by mgomez
Hello,

attached you will find the Angular and the API projects used that reproduce the problem.

Thanks

StimulsoftAngularTest.zip
(1.61 MiB) Downloaded 385 times

Re: Report variables missing in rendering NET 6 Angular

Posted: Thu Jun 06, 2024 11:42 am
by Vadim
Hello

Here is working sample

Re: Report variables missing in rendering NET 6 Angular

Posted: Thu Jun 06, 2024 3:40 pm
by mgomez
Now it works!

Thank you very much!

Re: Report variables missing in rendering NET 6 Angular

Posted: Fri Jun 07, 2024 7:14 am
by Lech Kulikowski
Hello,

You are welcome.