Passing parameters from user input to the JSON datasource

Stimulsoft Reports.JS discussion
oxyg3n
Posts: 5
Joined: Tue Nov 22, 2016 2:19 pm

Passing parameters from user input to the JSON datasource

Post by oxyg3n »

Hello. I need to make data filtration in the backend action that acts as json datasource for report. So i'm trying to pass user input parameters to backend action. Is it possible to pass variables to backend via get or post after user input?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Passing parameters from user input to the JSON datasourc

Post by HighAley »

Hello.

You could use variables in the path to the JSON. It will be like next

Code: Select all

http://example.com/json/{yourVariable}
Thank you.
AndreySE
Posts: 13
Joined: Mon Apr 11, 2022 8:19 am

Re: Passing parameters from user input to the JSON datasource

Post by AndreySE »

Hi, I have the same task, but it's working fine only on initial load, but after change variable value the endpoint is not called with a new parameter value. On report refresh by interval it's just updating UI without reloading datasource. Is it possible to update datasource? It's working fine with SQL parameters
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Passing parameters from user input to the JSON datasource

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
AndreySE
Posts: 13
Joined: Mon Apr 11, 2022 8:19 am

Re: Passing parameters from user input to the JSON datasource

Post by AndreySE »

Hi,

Here is an Web API demo project without auth for simplification and generated report (you need to restore NuGet packages). As you can see after changing parameter there is no backend requests, same here with refreshing report with interval.
Attachments
Report.mrt
(3.39 KiB) Downloaded 117 times
CompanyAPI.zip
(10.35 MiB) Downloaded 113 times
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Passing parameters from user input to the JSON datasource

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#6693
AndreySE
Posts: 13
Joined: Mon Apr 11, 2022 8:19 am

Re: Passing parameters from user input to the JSON datasource

Post by AndreySE »

Thanks Max, fill free to contact with me if you'll need any additional info about this issue!
Lech Kulikowski
Posts: 6237
Joined: Tue Mar 20, 2018 5:34 am

Re: Passing parameters from user input to the JSON datasource

Post by Lech Kulikowski »

Hello,

Ok.
Please let us know if you need any additional help.
AndreySE
Posts: 13
Joined: Mon Apr 11, 2022 8:19 am

Re: Passing parameters from user input to the JSON datasource

Post by AndreySE »

Hi, is any progress?
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: Passing parameters from user input to the JSON datasource

Post by Max Shamanov »

Hello,

The issue is fixed. The fix will be available in the next release build.

Thank you
Post Reply