Report variables missing in rendering NET 6 Angular

Stimulsoft Reports.NET discussion
Post Reply
mgomez
Posts: 10
Joined: Wed Jun 05, 2024 11:24 am

Report variables missing in rendering NET 6 Angular

Post 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 4560 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 4560 times
Please could you help me with this?

Thanks in advance
Regards
Attachments
ParametersDependentParameter.mrt
(217.76 KiB) Downloaded 384 times
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: Report variables missing in rendering NET 6 Angular

Post by Lech Kulikowski »

Hello,

How do you send it in the viewer?

Thank you.
mgomez
Posts: 10
Joined: Wed Jun 05, 2024 11:24 am

Re: Report variables missing in rendering NET 6 Angular

Post 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
Vadim
Posts: 409
Joined: Tue Apr 23, 2013 11:23 am

Re: Report variables missing in rendering NET 6 Angular

Post by Vadim »

Hello.

Can't reproduce, can you send us simple project that can reproduce problem?
Attachments
2.png
2.png (104.23 KiB) Viewed 4488 times
mgomez
Posts: 10
Joined: Wed Jun 05, 2024 11:24 am

Re: Report variables missing in rendering NET 6 Angular

Post 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
Vadim
Posts: 409
Joined: Tue Apr 23, 2013 11:23 am

Re: Report variables missing in rendering NET 6 Angular

Post by Vadim »

Hello

Here is working sample
Attachments
Angular_Demo.zip
(122.91 KiB) Downloaded 361 times
SampleStimulsoftWebAPI1.zip
(1.26 MiB) Downloaded 365 times
mgomez
Posts: 10
Joined: Wed Jun 05, 2024 11:24 am

Re: Report variables missing in rendering NET 6 Angular

Post by mgomez »

Now it works!

Thank you very much!
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: Report variables missing in rendering NET 6 Angular

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply