Hi,
when i print a Report (204) it will puts out a headerline on top oif the sales lines, thats nice

(Boxes in the Roundloop Header (1) )
In The Header Line it will be out "Discount %" , but if in the Order/Offer don't give Discount it will be write out the Text "Discount %" .
What must I Do if i only would be out the Header line if in one sales line is given a sales discount?
I have try make it so:
In DataItem RoundLoop, in On Pre DataItem ZTrigger i put follow code:
IF SalesLine."Line Discount %"<>0 THEN BEGIN
DiscountExists := TRUE;
END ELSE BEGIN
DiscountExists := FALSE;
END;
Then in Section(RoundLoop Header and ROundLoopTransHeader)
i put follow code:
before i give the textbox a name so that i can write him some string.
IF DiscountExists := TRUE THEN BEGIN
str_Discount := 'Discount %';
END ELSE BEGIN
str_Discount := '';
END;
But this only works if given a discount in sales line 1.
Perhaps anybody has a tip for me who i can solucioned it.
Thanks.
Comments
(define a new global var: recSalesLine as Record with subtype Sales Line):
this code works good. \:D/
Thank you.
Peter