Create filter variables programmatically

Stimulsoft Reports.JS discussion
MGS2516
Posts: 10
Joined: Fri Nov 08, 2019 11:04 am

Re: Create filter variables programmatically using report.fx for java

Post by MGS2516 »

Hi.
I already know pass all data to report. Now, i need create filter variables programmatically (not fixed in the report) and use them to filter data before show report viewer to user.

And also how to pass custom filter values to the datasource query using code in report.fx for java.

kindly help on this.

For Example : Select * from Users where user_id = @param1
through report designer,values we are giving like predefined. so those values data is showing in report viewer,but i need to pass the user selected custom varibles data to param1 variable to select the data and need to show the report.

kindly do needful asap.

thanks
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Create filter variables programmatically

Post by Lech Kulikowski »

Hello,

You can use a variable for that task:
select * from Users where user_id = {variable1}

Thank you.
MGS2516
Posts: 10
Joined: Fri Nov 08, 2019 11:04 am

Re: Create filter variables programmatically

Post by MGS2516 »

Lech Kulikowski wrote: Tue Nov 19, 2019 10:24 pm Hello,

You can use a variable for that task:
select * from Users where user_id = {variable1}

Thank you.
Thanks for the reply,

From Designer side ,through variable its working,but i need to pass the variable value form java code .
Kindly help on this ,how to pass the dynamic filter(variable values to the query from java code).

Thanks
Gopi G
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Create filter variables programmatically

Post by Lech Kulikowski »

Hello,

You can set the variable from javascript code:
https://stimulsoft.zendesk.com/hc/en-us ... cript-code

Thank you.
Post Reply