Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Repeat Record on Labels - Crystal Reports

I am looking for an easy way to fill an entire page of labels with the same record. I started with Crystal Reports labels and can only get one record for label. I tried setting up my page by creating 80 labels myself, but it's time consuming and it seems like there should be an easier way. Any suggestions? I also tried the "not equal" link to the same table and that didn't seem to work.

Former Member
Former Member replied

Well the 1st thing you need to do is determine how many times you want to repeat each record.

Then it just a matter if using a SQL Command to generate a series "dummy records" that can be used make the labels repeat. Something like this should do the trick...

IF OBJECT_ID('tempdb..#Temp') IS NOT NULL DROP TABLE #Temp
CREATE TABLE #Temp (Num INT)
DECLARE @i INT
SET @i = 1
WHILE @i <= 14
BEGIN
	INSERT INTO #Temp (Num) Values (@i)
	SET @i = @i + 1
END
SELECT Num FROM #Temp

The number of dummy rows being created is being determined with this line...

WHILE @i <= 14

I used 14 because that's a pretty common number of labels per page. If you want more or less, simply adjust that number.

After you've added the command DO NOT LINK IT to any other tables. The goal is to create a Carteasian product between your existing records and the dummy records.

The final step is place the {Command.Num} field on the label itself. You can hide it by making the text match the back ground but it does need to be there.

... and that should do the trick.

HTH

Jason

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question