Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula problem Post Reply Post New Topic
Author Message
immad
Newbie
Newbie


Joined: 05 Jun 2013
Location: Pakistan
Online Status: Offline
Posts: 25
Quote immad Replybullet Topic: formula problem
     Posted: 15 Mar 2015 at 8:29pm
hello,
i have this formula
WhilePrintingRecords;
numbervar slno;
slno := slno + 1;

i want if there is not data on product then
WhilePrintingRecords;
numbervar slno;
slno := slno + 0;

howi wrtie this in formula
immad
IP IP Logged
paulhoving
Newbie
Newbie


Joined: 21 Nov 2014
Online Status: Offline
Posts: 7
Quote paulhoving Replybullet Posted: 16 Mar 2015 at 12:01am
What kind of field is 'product'?

You could try something like (depending on the type of field):
WhilePrintingRecords;
numbervar slno;
If product = "" then
slno := slno + 1;
else
slno := slno + 0;

or

WhilePrintingRecords;
numbervar slno;
If isnull(product) then
slno := slno + 1;
else
slno := slno + 0;
IP IP Logged
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