on 01-07-2015 3:33 PM
Hi,
I have a report where, very occasionally, I might have multiple values in a collapsed line (@ two group levels actually, Pos, and Bez)
If I encounter this, I need to set a hi value and a lo value for each (displayed @ PosFooterA and B, and BezFooterA and B).
If I don't, I need the lo value to remain at 0, so I can check it, and collapse PozFooterB and BezFooterB.
As I recall, I've always been able to avoid multiple statements within an IF THEN, but here I am...
The error I'm getting is that the PolishPricePosHi just before the "and" needs to be a Boolean.
What is the syntax I need for this?
WhilePrintingRecords;
Global NumberVar PolishPricePosHi;
Global NumberVar PolishPricePosLo;
Global NumberVar PolishPriceBezHi;
Global NumberVar PolishPriceBezLo;
if {BW_ANGEB_STKL.BOM_PRODUKT} in [9101]
then
if PolishPricePosHi = 0
then PolishPricePosHi := {BW_ANGEB_STKL.PR_PREIS_ME}
else
if {BW_ANGEB_STKL.PR_PREIS_ME} > PolishPricePosHi
then PolishPricePosLo := PolishPricePosHi
and PolishPricePosHi := {BW_ANGEB_STKL.PR_PREIS_ME};
HI Matt,
Try:
WhilePrintingRecords;
Global NumberVar PolishPricePosHi;
Global NumberVar PolishPricePosLo;
Global NumberVar PolishPriceBezHi;
Global NumberVar PolishPriceBezLo;
if {BW_ANGEB_STKL.BOM_PRODUKT} in [9101]
then
(
if PolishPricePosHi = 0 then
PolishPricePosHi := {BW_ANGEB_STKL.PR_PREIS_ME}
else if {BW_ANGEB_STKL.PR_PREIS_ME} > PolishPricePosHi then
(
PolishPricePosLo := PolishPricePosHi;
PolishPricePosHi := {BW_ANGEB_STKL.PR_PREIS_ME};
)
)
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.