I am a newbee to jasper reports..My question.
Can we dynamically change a dataset query that is used for a table entity ,
if we can , please tell me how
I am a newbee to jasper reports..My question.
Can we dynamically change a dataset query that is used for a table entity ,
if we can , please tell me how
Yep we can .
Say you define 3 queries
q1 , q2 , q3
and a condition say cond1 which will determine which query will be used
Now, you can take a parameter say $P{param1} and set its default value expression as
If cond1 is true then set q1 else set q2
So , basically your param1 will be containing exact query which you will be executing
Now, Open query edition use param1 as a placeeholder ie whatever be the content of param1 , they will be executed as such .
Type like this
P!{PARAM1}
and preview .
This should do.
Regards, Ankush