Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Missing numbers report Post Reply Post New Topic
Author Message
muayguy
Newbie
Newbie
Avatar

Joined: 08 Jul 2008
Online Status: Offline
Posts: 1
Quote muayguy Replybullet Topic: Missing numbers report
    Posted: 08 Jul 2008 at 9:28am
I am looking for an easy way to do a missing numbers report in CR 11.
 
You are given the starting and ending numbers as parameters. The known numbers are in a  table.
 
So say your parameters are start = 1000, end = 5000, and we have 1000-2500, 2505-4999 in the table, the report rows will be
 
2501
2502
2503
2504
5000
 
thanks in advance
MG
 
IP IP Logged
venkatesha
Newbie
Newbie


Joined: 29 Jun 2008
Online Status: Offline
Posts: 35
Quote venkatesha Replybullet Posted: 09 Jul 2008 at 6:13am
Local numbervar i;
Local stringVar sno ;
if(OnFirstRecord) then
    (
      for i :=  {?Param2} to {Sno.RollNo}   do
    (    
                sno:= (sno + ToText(i)+ chr(13));         
    );
    sno;
    )
else if(OnLastRecord) then
(
    if({Sno.RollNo}  <  {?Param2}) then
    (
    for i :=   {Sno.RollNo} to {?Param2} do
    (                
                sno:= (sno + ToText(i)+ chr(13));                  
    );
    );
    sno;
)
else
(
    
        if(  ({Sno.RollNo} <> next({Sno.RollNo}))  ) then     
        (  
            if  ((next({Sno.RollNo}) <  {?Param2})) then
           for i := {Sno.RollNo}+1 to  next({Sno.RollNo} )-1 do
           (           
                sno:= (sno + ToText(i)+ chr(13));         
            )
            else
                 for i := {Sno.RollNo}+1 to  {?Param2} do
           (           
                sno:= (sno + ToText(i)+ chr(13));         
            )
                
        );
    sno;    
)

Edited by venkatesha - 09 Jul 2008 at 6:22am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.