I have a report that show the First and Ending number,so what i want is to check that in that range if there is a number that is missing,for instance 1 to 10 then if 6 is not there i want to displa a message saying the number is missing,please help with the code.The first and last number are variables.
Use the OnAfterGetRecord trigger of the report’s data item and write something like this:
If fieldName = 6 then message(‘messageText’);
Note that the message will be displayed when the report is finished… if you want to show that missing numbers on the report use a control on the report. Hope it helps
What i mean is you have this customer (e.g. CUST0001 to CUST9999),and i want to see if there is a number which is missing or not there when we create customer for instance (Cust002) is deleted or skipped then i want to see those ones that are missing! thanks again for the reply!!
I tried to use INCSTR(Myvariable),but i have’nt tested yet!
I’m afraid you have a little mess or I didn’t understand your explanation siya10.
You don’t need a DoWhile structure… using a report, the AfterGetRecord trigger works like “DoWhile”, so you will get an iteration for each customer (if we are taking about Customer table). You just need a global var to store all missing values and show them either with a control or with a message.
I thank you talked about a fixed value to compare (like “6” in the example), but if you want to check a sequence (Customer.“No.” for example), the comparison would be something like this:
IF Customer.“No.” <> INCSTR(xRec.Customer.“No.”) THEN missedValues := missedValues + ", " + INCSTR(xRec.Customer.“No.”);
You just have to display a MESSAGE(missedValues) on OnPostDataPort trigger. Better?