setting range in IF Condition

Hi All,

Whether its possible setting range in IF THEN Condition.

For example, Checking like lineCount between 3 to 7 then nextpage…

I try with like dis IF (LineCount > 3) OR (LineCount> 7) THEN but result of 1st page will be 4 lines since it satisfied 1st condition skip to nextpage…

Any suggest plz. Thanks

What exactly is your requirement?

In a page 5 Product is displayed but each product may have 2 lines or may have 1 line also…

in page the line print limit is minium is 5 maximum 10 lines…

Use the counter in sections - OnPreSection()trigger and check the condition…

I have written in OnPreSection()

Detail, Body (3) - OnPreSection()

CurrReport.SHOWOUTPUT((SalesLineExist = FALSE) AND TempBuffer.Bol1);
LineCount:=LineCount+1;
//IF (LineCount>10) THEN
IF (LineCount>5) OR (LineCount>10) THEN
BEGIN
CurrReport.NEWPAGE;
LineCount:=1;
END

Its satisfying either one condition only

Can we Identify which Line we are printing in 2 lines for product?

If yes, include that also in conditionn

Here linecount , I counted for the page

I don’t understand this part of the code you wrote above

(LineCount>5) OR (LineCount>10)

why would it ever need (LineCount>10)?
if it’s 11 then the >5 already took care of it.

IF (LineCount > 3) AND (LineCount < 7) THEN

or if “between 3 to 7” should inlcude 3 and &:

IF (LineCount => 3) AND (LineCount =< 7) THEN

Luc van,

I try using ur above stmt but showing warning message A value or an expression was expected.

My requirement is explained faces 2 cases,if i use dis code it is satisfying one case

IF (TotalCount>3) AND (TotalCount<7) THEN
BEGIN
CurrReport.NEWPAGE;
TotalCount:=1;
END;

Case 1

StockNo Type Desc StoneWeight price

2000 item desc1 0.98 2200.00

1982 item desc1 0.67 1500.00

2000 item desc1 0.98 2200.00 ------ print in 1st Page oly 3 lines but 3 item is there

1982 item desc1 0.67 1500.00 -------- print in 2nd Page

Case 2

StockNo Type Desc StoneWeight price

2001 item desc1 0.98 2200.00

desc2
1982 item desc1 0.67 1500.00

2001 item desc1 0.98 2200.00
desc2 ------ print in 1st Page 5 lines but 3 item

1982 item desc1 0.67 1500.00 -------- print in 2nd Page

Nisha, sorry for the typo here; it should have been:

IF (LineCount >= 3) AND (LineCount <= 7) THEN

Then:

I quess we’re al struggling trying to understand your requirements. First you tell one (your first post in this thread), now you tell there are two. So let’s return to the question Mohana posed:

Please elaborate on that.

And I do not want to be offensive, but to be honest: you’re English phrasing is not so easy to understand.