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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count up function?

Status
Not open for further replies.

kdied

Technical User
Apr 12, 2012
7
US
I don't believe there is a count up function in Crystal, but I hoping I am wrong. Does anyone know?
It should be so simple. It is a 1 page report (actually label), but I want it to sequentially number the labels....
so if I print 10 labels, I want them to say 1,2,3,4........
 

I'm not positive what you're doing - are there multiple labels per page, or one label per page?

If multiple labels per page, the Special Field --> Record Number should do the trick.

 
It is one label per page, but the thing is that it is only 1 record, so it will keep printing 1.
If I print 300 labels, I want them to be numbered consecutively. Maybe I need a formula that includes how many copies are printed?
 

Rather than printing multiple copies of the report, it might be easier to force the report to contain as many records as you want copies - then you can force a new page after each record.

Create a command object, you can use any data source since you won't be using any database fields:

Code:
declare @v_values table
(rowid int)

declare @x int
set @x = 1

while @x < 100 --change this value to suit your needs

BEGIN
insert into @v_values (rowid) values (@x)
set @x = @x + 1
END

select * from @v_values

Do not link it to any other table. put the rowID field from the command into the details section. Now if you refresh you should have 99 records.

Next create a numeric parameter called Copies. Make your record selection criteria: RowID <= {@Copies}

Add the page break and you should have the same database record replicated x number of times, each on its own page.

 
Ok. I'll try that.Thanks much. I will let you know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top