Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 20, 2010 at 04:28 PM

    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)
    SET @i = 1
    WHILE @i <= 14
    	INSERT INTO #Temp (Num) Values (@i)
    	SET @i = @i + 1
    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.



    Add comment
    10|10000 characters needed characters exceeded

  • Oct 22, 2010 at 09:50 PM

    Assuming you are using a version of CR Designer that has this functionality.....

    Another way is right click on the Detail section and Select the Section Expert and then check on the option Format with multiple columns. Click on the Layout tab which is now enabled and you can fine tune the positioning. Now drop the fields you want to use across the section, once for each label. This fills up the first row.

    Now insert the number sections below for the number of rows of labels. Copy all of the first section fields and paste into each section. They should all keep their relative positions.

    Thank you


    Add comment
    10|10000 characters needed characters exceeded