Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi experts,
i have the following qvd.
SalesEX:
LOAD CODE,
Date,
PNOEX,
Qty,
Amount
FROM
QVD\SalesEX.qvd
(qvd);
in this qvd, PNOEX denotes the product nos.
for example i have the PNOEX values as
NO1234
NO5660
NO6255
NO9539 & so on
i need to calculate the total sales ytd for a particular PNOEX value & to be displayed in a textbox like the following
how can i make it.
Please give suggestions
Hi,
You require only values from PNOEX field .You can try this expression.
Sum({<PNOEX={'NO1234','NO5660','NO6255'},Date= >} Amount)
Provide sample data... would work in your question..
Not with a text box. A text box has a finite display area, and you won't get scrollbars if the text doesn't fit. Imagine that you have about 50 PNOEX-values...
Use a straight table with a two-line caption and cut down on the chrome. You can get it to look like a text box with decent behavior.
hi Peter,
i didn't get your point 'cut down on the chrome'.
explain a bit more please.
how can i do that.
also i have only 9 PNOEX values. out of that, i need to display only three.
if it cannot be done in single text box, i can have three.
please suggest
Hi,
You require only values from PNOEX field .You can try this expression.
Sum({<PNOEX={'NO1234','NO5660','NO6255'},Date= >} Amount)
I meant to say that if you omit borders in a straight table, and color everything (cell backgrounds, captions etc.) the same, a straight table may start to look exactly like a text box. The advantage is that you'll only need a single expression with simple set analysis, while in a text box you'll have to use concat() and aggr() to manipulate the different text strings. The latter is not very elegant...
Peter
= Concat(DISTINCT If( Match(PNOEX, 'NO5660','NO1234'),PNOEX & ' (sales YTD) - ') & If( Match(PNOEX, 'NO5660','NO1234'),Aggr(Sum(Amount),PNOEX)),Chr(10))
Here's an example like pcammaert suggested, using a table that looks like a text box.
hi krishnama Naidu,
its working
thanks a lot.
thanku all
i tried all the methods. its working fine