Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to display a chart which should show ouput by taking run time variables. for eg two buttons are displayed, one representing qtd and other is mtd.
when i click qtd, chart should show the data based on qtd.
How do i achieve these through expressions?
Need help on urgent basis,
Thanks,
Praveen.
Hi,
Set a variable(lets say vVariable) on click with value qtd and mtd as your requirement.
Then write expression in chart as
=if(vVariable='qtd',qtd expression,mtd expression)
Celambarasan
Hi,
Create two buttons for YTD and QTD, and change the variable value in
Button Properties -> Actions-> Add -> External -> Set variable (here give variable name and value);
The value should be suppose for YTD button give 'YTD' for QTD give 'QTD' and assume that variable name is vType
Now use the following expressions
If(vType = 'YTD', Sum({<Date={'>=$(=YearStart(Max(Date)))<=$(=Today())'}>} Sales),
Sum({<Date={'>=$(=QuarterStart(Max(Date)))<=$(=Today())'}>} Sales))
Hope this helps you.
Regards,
Jagan.
jagan,
wher do i add my expression in ur above said expression,
I am using this expression to display the value,
sum( Interval ( DISCHARGE_TIME - ADMISSIONTIME,'hh:mm:ss')),
i need to display the same using the buttons with qtd and mtd.
Hi,
Try replacing your expression with thi
If(vType = 'YTD', Sum({<Date={'>=$(=YearStart(Max(Date)))<=$(=Today())'}>} DISCHARGE_TIME - ADMISSIONTIME),
Sum({<Date={'>=$(=QuarterStart(Max(Date)))<=$(=Today())'}>} DISCHARGE_TIME - ADMISSIONTIME))
Regards,
Jagan.
jagan,
the above said expression is not working should i create a variable in variable overview window in settings header.
celambarasan,
What wil be the value of the variable qtd, how i do declare that, i just need the syntax. then how do i call those in my expressions?
Hi,
vType is a variable which holds the selected date type (YTD/QTD).
Regards,
Jagan.
So i need to create any variable declaring these?
Hi,
You have to create a variable(like vVariable) first.
Create 2 buttons.
In Qtd button-->Properties-->Actions tab-->Add button-->Select external--> choose Set variable.variable name vVariable value as ='qtd'
Same for ytd button but variable value as ='mtd'
Then in chart wrote expression as
=if(vVariable='qtd',qtd expression,mtd expression)