Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have a question,
i want to show the data based on user entry, i want to show all data if user doesnt input any data. When user input the data, it will show the data based on the entry.
I'm using this expression
if($(=len(percenFrom))=0 or $(=len(percenTo))=0,'A', 'B')
it works perfectly, but when i change the result A and B to another 'if condition' it doesnt show any data when im not enter the data. but when i enter the data it works perfectly.
Really appreciate your help, thanks
May be you need to check your second if condition if the one you have posted here is working as expected. Can you share the complete expression here?
=if($(=len(percenFrom))=0 or$(=len(percenTo))=0,
if(IsNull(vYear)
if(isnull(vWeek),
Sum({$<TRX={1}>} QTY),
Sum({$<TRX={1}, YearWeek={$(vWeek)}>} QTY)
),
if(isnull(vWeek),
Sum({$<TRX={121}, Year={$(vYear)}>} QTY) ,
Sum({$<TRX={121}, YearWeek={$(vWeek)}, Year={$(vYear)}>} QTY)
)
),
.....
.....
)
the first condition will show all data if user doesnt entry the input box (percenfrom/percento)
Not sure if this is the exact expression copy pasted from source or if it is just a typo, but a comma seems to be missing. See if that helps.
Indra Setiana wrote:
=if($(=len(percenFrom))=0 or$(=len(percenTo))=0,
if(IsNull(vYear) //Comma missing here
if(isnull(vWeek),
Sum({$<TRX={1}>} QTY),
Sum({$<TRX={1}, YearWeek={$(vWeek)}>} QTY)
),
if(isnull(vWeek),
Sum({$<TRX={121}, Year={$(vYear)}>} QTY) ,
Sum({$<TRX={121}, YearWeek={$(vWeek)}, Year={$(vYear)}>} QTY)
)
),
.....
.....
)
the first condition will show all data if user doesnt entry the input box (percenfrom/percento)
Dear Sunny,
oops sorry, it's just a typo, the source expression has comma, but it still not working,
Do you have any idea, confuse about it.
Try this may be:
if($(=len(percenFrom))=0 or$(=len(percenTo))=0,
if(Len(Trim(vYear)) = 0,
if(Len(Trim(vWeek)) = 0,
Sum({$<TRX={1}>} QTY),
Sum({$<TRX={1}, YearWeek={"$(vWeek)"}>} QTY)
),
if(Len(Trim(vWeek)) = 0,
Sum({$<TRX={121}, Year={"$(vYear)"}>} QTY) ,
Sum({$<TRX={121}, YearWeek={"$(vWeek)"}, Year={"$(vYear)"}>} QTY))),
Dear Sunny,
Thanks for your response Sunny, but it still not working
do you have another idea ?
thanks
Can you test if individually each of the expression is working or not. These
1) Sum({$<TRX={1}>} QTY)
2) Sum({$<TRX={1}, YearWeek={"$(vWeek)"}>} QTY)
3) Sum({$<TRX={121}, Year={"$(vYear)"}>} QTY)
4) Sum({$<TRX={121}, YearWeek={"$(vWeek)"}, Year={"$(vYear)"}>} QTY)
Hi Sunny,
all of the statement works perfectly Sunny, no problem with the statement.
please try the following expressions ina text object and see if they return any values
A
if(IsNull(vYear)and isnull(vWeek),Sum({$<TRX={1}>} QTY),if(IsNull(vYear)and not isnull(vWeek),Sum({$<TRX={1}, YearWeek={$(vWeek)}>} QTY) ,0)
B
if(isnull(vWeek),
Sum({$<TRX={121}, Year={$(vYear)}>} QTY) ,
Sum({$<TRX={121}, YearWeek={$(vWeek)}, Year={$(vYear)}>} QTY)
hth
Sasi