May 3, 2012 at 12:57 am
I have a table with 1 column and 900 rows which is result of
select distinct department_code from mytable
where user = 'myname'
The result is :
Myname
101
102
103
...
999
so it is several pages with only 1 column and the rest of the page is blank.
instead of that I want to show result like:
Myname
101 102 103
104 105 106
... 999
any suggestion ?
cheers,
Amir
May 3, 2012 at 7:14 am
Try this:
http://p2p.wrox.com/content/articles/creating-mailing-labels-sql-server-reporting-services
It is stated in the link, but it deserves restating. You will only see the proper layout in print preview mode.
May 3, 2012 at 6:45 pm
Thanks a lot,
The answer definitely is changing number of page columns in the report property. But this change only appears when the report is saved as PDF not on the webpage. i.e users having access to SSRS webpage and when they run the reports they will see the webpage output rather than PDF.
Is there anyway that I can force them to see the PDF format for this specific report ?
Cheers,
Amir
May 4, 2012 at 8:04 am
Amir:
Is your goal merely to display all 900 on a single page? If so, why not just concantenate all of the values into a single field? Make the field the width of the report page, and set the field to auto expand to accomodate all of the text (default behavior)?
--pete
May 4, 2012 at 9:32 am
Thanks Pete,
But how can I concatanate them?
May 4, 2012 at 9:57 am
Well, one approach is to do the concantenating in sql -- i.e., rather than return a dataset with 900 rows of data of distinct values, return just one row with the values already concentanted in a single field. Refer to Jeff Moden's excellent article on contentation functions (http://www.sqlservercentral.com/articles/Test+Data/61572/) -- his ultimate recommendation is at the end of the article which leverages a little bit of XML and a correlated query.
I don't think the Join() function in SSRS will work on a dataset; it works on a parameter such as a multi-select parameter, however. Here's a link to Luke Hayler's article on the Join() function (http://lukehayler.com/2009/08/the-join-function-in-ssrs/[/url]); some of the commenters encourage doing concantenation in SQL rather than attempting to do so in SSRS.
--pete
May 5, 2012 at 3:56 am
Thanks Pete, for your valuable info
Cheers, Amir
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply