Connecting Tech Pros Worldwide Help | Site Map

crystal report problem

Member
 
Join Date: Mar 2007
Posts: 117
#1: Mar 6 '09
hi all,
i have a field that shows the serial no.in my report. i also have condition "show with zero balance" and "show without zero balance" in the form. when i use the first option, it shows all users having balance 0 or greater than 0, and if 2nd option is used, it shows the users having balance greater than 0 only. i have used the record number for the serial no. field. what my problem is that, when i used show with zero balance, it shows 1,2, 3 and so on on the serial no field. but when i use the "show without zero balance option" it shows random numbers like 1,3,7,15,18 and so on. i want to show it serially.

any help is appreciated.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,499
#2: Mar 6 '09

re: crystal report problem


is the serial number stored in the database ?
QVeen72's Avatar
Moderator
 
Join Date: Oct 2006
Location: Bangalore
Posts: 1,385
#3: Mar 9 '09

re: crystal report problem


Hi,

First To show users with balance, pass a selection formula before showing the Field:

Report.SelectionFormula = "{MyTable.MyField} <> 0 "

So, the Parties without the Balance are suppressed.. /Not Shown, and your RecordNumber, will work fine.

If it dosent solve, Create a new FormulaField like this :
Expand|Select|Wrap|Line Numbers
  1. WhilePrintingRecords;
  2. NUMBERVAR myslno;
  3. If RecordNumber =1 Then 
  4. myslno := 1
  5. Else
  6. myslno := myslno+1
  7.  
and place it on the Report

Regards
Veena
Reply


Similar Visual Basic 4 / 5 / 6 bytes