Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Counting for Labels


Counting for Labels

Author
Message
dbaker 32911
dbaker 32911
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 48
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!
Scott Murray-240410
Scott Murray-240410
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 3067
What about filtering the dataset or the tablix using the Top N values.
dbaker 32911
dbaker 32911
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 48
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.
Scott Murray-240410
Scott Murray-240410
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 3067
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.
Steven.Howes
Steven.Howes
SSChasing Mays
SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)SSChasing Mays (658 reputation)

Group: General Forum Members
Points: 658 Visits: 2328
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.
dbaker 32911
dbaker 32911
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 48
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!
Scott Murray-240410
Scott Murray-240410
SSC Veteran
SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)SSC Veteran (249 reputation)

Group: General Forum Members
Points: 249 Visits: 3067
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.
dbaker 32911
dbaker 32911
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 48
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!:-D
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search