 |
| Reporting Services SQL Server Reporting Services. Please specify which version. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 6th, 2008, 06:04 AM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
concat multiple column values into single col
pls assist me in finding the solution for this problem...
i've table similar to this... i've generated this report using report desingner...
1 WN
1 RN
1 ED
1 WW
2 ee
2 tt
the second column should be concatinated in single column
1 WN,RN,ED
2 ee,tt
does this problem has any solution.............
|
|

May 8th, 2008, 08:16 AM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
Tell me one thing if your second column will have the value as string?
if it will print the string value then just write within expression your first column value + second column value etc.
If it is not string then also have solution.
just tell me exact what do you need?
Somesh
|
|

May 8th, 2008, 10:27 PM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi somesh..
the second column contains string values
actually iam using reporting services 2005 for the first time,
so iam not familiar with exact sytax..
could u tell how to fetch a particular column value
i tried with =fields!field1.Value{0}
also the concatenation of second column values rely on first column,
as the first column values varies...
hope u got my question properly...
can i make the same in the stored procedure itself, if so can u give me the full query..
thanks
|
|

May 8th, 2008, 11:26 PM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
just open your report defination file. It is you physical report file that mines RDL or RDLC file.
Right click on your text box field (the field of your table where your =fields!field1.value{0}). Write there some thing like given below:
=fields!field1.Value+fields!field2.Value+fields!fi eld3.Value
I think it will work. If not then rell me.
With Regards
Somesh Chatterjee
|
|

May 8th, 2008, 11:42 PM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
One more thing to fetch a particular column value the procedure is given below:
On your report lay out Drag & Drop a table.
You will see that three rows are coming automatically.
First one is Header, second one is Detail and third one is footer.
You will get Data set on your left side where your tolls are coming. If it is not coming just see the upper menu bar you will get there file,View,edit some things. There you will get Data. Just click on Data, there will get dataset. Click there your dataset will come.
Now Data set is n your left side of the screen. You will get the fields of your dataset. Drag and drop any field of your dataset to your any textbox of table(on the lay out region) on the middle row (Detail row).
Now you will get that the header is taking your field name and second row text box is getting like.=Fields!Field1.Value. You can edit your header. You can put any suitable name for header field.
You need not do any more.
I think it will help you.
With Regards
Somesh Chatterjee
|
|

May 12th, 2008, 02:11 AM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
in report designer , i right click the textbox field and i get expression..
iam unable to use this in the expression..
Fields!Field1.Value{0}
its showing unidentifies syntax for {}
also tried with () and []
suppose i've a table like this..
id qualification
1 BE -------->how is this column value can be accessed
1 MCA (Fields!Field1.Value)--not working
2 MBBS
2 MD
2 FS
my desired result should be like this
id qualification
1 BE,MCA
2 MBBS,MD,FS
please understand my problem definition.....
thanjks
|
|

May 15th, 2008, 01:02 AM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi,
The syntax will be like this in expression
=Field!Field1.Value.
Note :- = you have to write.
Don't use {} or () no need of any bracket.
Somesh
|
|

May 21st, 2008, 03:51 AM
|
|
Authorized User
|
|
Join Date: Nov 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi sirf_vs
tell me is it working or not?
Somesh
somesh chaterjee
|
|

May 29th, 2008, 09:16 AM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I have a quick question similar to the one previously asked, but slightly different.
I have two tables that I am pulling data from. In the first table, it contains the majority of fields I will pull information from into a report. There is a one to many relationship between table1 and table2, where the ID from table1 is related to multiple Companies in Table2. I need to pull those values into a single field on the report. See example below:
Table1
ID Status Summary
1 Open Problem with Product X
2 Closed Not receiving product Y
Table2
ID Company
1 NBC
1 ABC
1 CBS
2 CW
2 ABC
I need the results to look as follows
ID Status Summary Company(s) Affected
1 Open Problem with Product X NBC, ABC, CBS
2 Closed Not receiving product Y CW, ABC
I believe that I need to create custom code that I would use in the textbox for "Companies Affected" that will concatenate the multiple rows from table2 into a single string based on the ID, but I am not sure how exactly to write this in the custom code screen.
Any help would be appreciated!!
|
|
 |