Page 2 of 2

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

Posted: Fri Nov 15, 2019 6:50 am
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

Re: Create filter variables programmatically

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

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

Thank you.

Re: Create filter variables programmatically

Posted: Wed Nov 20, 2019 11:01 am
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

Re: Create filter variables programmatically

Posted: Mon Nov 25, 2019 8:22 pm
by Lech Kulikowski
Hello,

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

Thank you.