Is there anyway we can display values seperated by comma, in a textbox, in a Page Header
[using SSRS 2008 R2] Hi All, If we put a textbox in a Page Header and put inside database field then we have only option to display FIRST value of that field. That means, in page header, within a textbox my expression is like below:- =First(Fields!MyField.Value, "DataSet_PageHeader") Now, my question is, if we have, say for ex, 4 values(string values) for this MyField and if I want to display all 4 of them seperated by comma, then how to do that? (e.g. I want values to be displayed like A,B,C,D within that textbox) Is this possible to do, and if not- is there any alternate to this? Thanks,
December 17th, 2010 11:51am

A textbox is not a data region, thus if you drag a field from dataset it automatically builds the expression to pull only one value and by default First(). So to answer your question, "Is this possible to do" the answer is NO. But try this... Create a multi value parameter Choose From Query in the available values. From the drop down in the dataset select Dataset_Pageheader(your example). In the value field select MyField and give a name in the label field. Finally in the page header, use Parameters!ParameterName.Value Hope this helps!
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 12:16pm

Hi Samuel, Thanks for ur input on this. but it seems this idea will not work because of the below 2 reasons:- 1) When I create another parameter it will then propmt me for it to select value for that parameter , which ideally I dont want i.e. to create additional parameter. 2) Even if I create additional parameter for it, then inside textbox of page header, when i write expression like you said, Parameters!ParameterName.Value then in that case also it will display only that value selected by user. But my requirement is to display all the values for that field (i.e. A,B,C,D from my original post) and not just one selected by user. -T
December 17th, 2010 12:52pm

Hi, You can give the default value to that parameter as = "A,B,C,D" and than hide that parameter (so user don't have to do anything with it, its for your own purpose only). Is that fix both of your issues? Please let us know feedback. Thanks KumarKG
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 1:01pm

I cannot give default value (A,B,C,D was just there to give you an example) The value is from database field (MyField --> DataSet_PageHeader) and this field can have multiple values.
December 17th, 2010 2:29pm

Hi, If you add a new parameter, their will be tab called "Default Values" underneath their are 3 radio button, please check the 3rd radio button which says, "Get values from a query", which will prompt you DataSet-Name & Value field. I hope this will help you out. Please let us know your feedback. Thanks KumarKG
Free Windows Admin Tool Kit Click here and download it now
December 17th, 2010 2:41pm

[using SSRS 2008 R2] Hi All, If we put a textbox in a Page Header and put inside database field then we have only option to display FIRST value of that field. That means, in page header, within a textbox my expression is like below:- =First(Fields!MyField.Value, "DataSet_PageHeader") Now, my question is, if we have, say for ex, 4 values(string values) for this MyField and if I want to display all 4 of them seperated by comma, then how to do that? (e.g. I want values to be displayed like A,B,C,D within that textbox) Is this possible to do, and if not- is there any alternate to this? Thanks, Try the Join() method in combination with the LookupSet() method. Maybe the Join() method will be enough for you. I'm not too sure, though. I have many text boxes with items from multiple rows of a dataset separated by a comma. Here is an example of one such expression: =Join(LookupSet(Fields!Entity_Id.Value, Fields!Entity_Id.Value, Fields!Name.Value, "LeafAttributes"), ", ") I hope this helped, Josh
December 17th, 2010 3:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics