Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Counting for Labels Expand / Collapse
Author
Message
Posted Monday, March 11, 2013 7:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 12:29 PM
Points: 5, Visits: 40
I am running all of my production labels using SSRS 2008R2

I am trying to constuct a label that will Print x number of labels based on a parameter.

For example, If a user wishes to print 5 labels starting at #1 they would select a start parameter value of 1 and an End Parameter value of 5.

The report would then Print 5 labels.

At the same time I would like to display 1 of 5, 2 of 5, etc... on each label.

Anybody have any suggestions? This one has me a little stumped!
Post #1429251
Posted Tuesday, March 12, 2013 6:08 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 4:19 AM
Points: 243, Visits: 2,686
What about filtering the dataset or the tablix using the Top N values.
Post #1429724
Posted Tuesday, March 12, 2013 6:52 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 12:29 PM
Points: 5, Visits: 40
The issue isn't so much with the query. The query only returns one record. This is probably a newbe issue but what I am trying to accomplish is simply to have the identical label print with 'Box 1 of 4' , 'Box 2of 4' etc...

Unfortunatly, I have not been able to figure out first how to print multiple labels from a single query yet.
Much less add the counts to the label.
Post #1429757
Posted Tuesday, March 12, 2013 7:13 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 4:19 AM
Points: 243, Visits: 2,686
Not sure how you can get from one row to multiple labels other than passing a the count to the query. You could also potentially use the row number function once you get the correct number of rows.
Post #1429785
Posted Tuesday, March 12, 2013 8:23 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, August 21, 2014 7:26 AM
Points: 583, Visits: 2,090
Jeff Moden has some articles here on Tally tables. You could make a tally table with N rows in it (N being a Parameter passed to the query like Scott suggested) and join that table to your original table.

Post #1429845
Posted Thursday, March 14, 2013 9:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 12:29 PM
Points: 5, Visits: 40
Thanks for the help guy's!

I now have my query returning x records based on the parameters, with a field (N) containing the count that I need.

fro example if the user select to start @ box 1 and print 5. The query returns 5 records with a field that contains 1,2,3,4, and 5 respectively!

Now the next part of the same issue.

How do I get the report to generate for each individual record? In the case above I would want it to have 5 pages to the report with the first one having a 1 for field (N), the second having a (2), etc...

I know it can't be too difficult and I am missing something basic.

Again, thanks in advance for the help!
Post #1431065
Posted Thursday, March 14, 2013 9:45 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 4:19 AM
Points: 243, Visits: 2,686
I would set the page size to your label size, and then group on the N values and tell the group to page break between each group.
Post #1431075
Posted Thursday, March 14, 2013 1:14 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 15, 2014 12:29 PM
Points: 5, Visits: 40
thank you for all of your help. I have it working now.

What I had to do is create a list and put all of the fields inside the list.

I added a page break after the list and it works great!
Post #1431208
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse