Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula for Tag Number 1

Status
Not open for further replies.

RedHeadedStepITChild

IS-IT--Management
May 31, 2007
46
US
I am using CR to create tags for inventory of our finished goods. I need to be able to put a tag number on each tag. The tag consists of information (item number, location, ect) listed in the detail section. I added a Detail B section, and copy/pasted the same information into that section. The paper is perforated horizontally, so the counters will tear the Detail B section off to turn in. I need to be able to match tags by tag numbers. I thought about just putting the page number field in the detail section, however, I want to be able to assign a starting tag number each time we do inventory, so a range of tag numbers can be assigned to the date the inventory was done.

So, this is where I am at. I thought that I could just create a parameter asking to declare the starting tag number, and then insert a formula that would add 1 to each subsequent tag. I am not doing something right, since if I enter 1000 as the starting tag number, each tag thereafter is 1001. I have approximately 7,000 records (tags). Logically, the last tag number should be 8000, not 7001.

Anybody have ideas?

Thanks,

Jason

 
YOu need to use a variable in your formula

In report header
@initialise
Whileprintingrecords;

global numbervar tagNo:= {parameter};

In your pageheader or wherever you increment count
@evaluate
Whileprintingrecords;

global numbervar tagNo:= tagNo +1;

Ian
 
Great! I'm always just one step off from being half-way decent at this Crystal stuff..haha.

Now...I was wondering if you could help me with the next step. While your variable declaration and formulas gave me what I needed, I think I need some sort of IF/THEN statement. This is why:

I enter in 1000 as the starting tag number, but the report assigns 1001 to the actual first tag. Something along the lines of

If tagNo: is first record then {?Parameter} else
tagNo: = tagNo: +1.

I do not know the proper syntax for "first record." Can you help me there?

Thans in advance,

Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top