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

SSRS Report : Help Me to display text box values in Header of the report Expand / Collapse
Author
Message
Posted Thursday, July 18, 2013 2:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 5, 2014 1:23 AM
Points: 4, Visits: 62
Hello guys,
sorry if I am posting in the wrong section of the Forum, I am looking for the help on SSC.

My Issue:
Hey guys, I have a requirement form the SharePoint developing team, they have given me a simple SELECT statement with a Where Condition and asked me to develop a report and I did.
so far so good. Now, they want to have a Dynamic Report Headeing which displays different Heading for Different Report-data, to explain more here is a screenshot:



when the report fetches the data for 5 countries then they need heading like "List for - COUNTRY1 COUNTRY2 COUNTRY3 COUNTRY4 COUNTRY5"

but,
- They don't want additional DataSet
- They don't want any changes to the query (which they gave)
- They don't want any additional Parameters

in shot,
as per my understanding, i guess they are asking me to write custom code to do so! (in VB.NET)
and i have no idea about it

Please do help me guys
Best Regards,
Cheers

Post #1474939
Posted Friday, July 19, 2013 9:54 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 5:52 AM
Points: 1,094, Visits: 2,331
Youre looking for an expression in a text box where: either 1. a parameter like, =Parameters!Month.Value or 2. a field value like, =Field!(yourfield).Value.
Post #1475568
Posted Friday, July 19, 2013 10:11 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 9:19 AM
Points: 304, Visits: 839
To expand on what Mr. Garrison said:

You can refer to objects in the body of the report by object NAME in the header, so a way this is often solved is by adding a textbox (let's say it's called Textbox21) tucked away in the body that shows exactly what you want (e.g. Fields!somefields.value), setting Textbox21 to be Hidden, and then adding a box in the header that points to that hidden textbox by it's object name (e.g. ReportItems!textbox1.Value).

Try that and see if it works!
Post #1475578
Posted Monday, July 22, 2013 6:55 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 5, 2014 1:23 AM
Points: 4, Visits: 62
^ thanks for the reply
i did the same which is placed here in the tutorial
http://www.heysup.net/ssrs-tutorials/sql-server-reporting-services-ssrs-how-to-display-textbox-value-in-header-of-the-report/268/

but the thing is i need coma separated value if more then 1 county is in result by using Reportitems!TextboxName.Value I am ending up with Last country name being displayed. I mean if i have 2 countries in result set I end up with 2nd country being dispalyed
Post #1475989
Posted Tuesday, July 23, 2013 5:40 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 5:21 AM
Points: 243, Visits: 2,708
You might want to take a look at:
http://www.mssqltips.com/sqlservertip/2972/sql-server-reporting-services-reportitems-collection/
Post #1476515
Posted Tuesday, July 23, 2013 10:06 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 9:19 AM
Points: 304, Visits: 839
Are the groups always exactly the same as the parameter? E.g. Are the users selecting from a list of countries? Are the display values for the Parameter the same as what they'll be show in the report for the Group headers? In that case, you can try this (which should work in a text box directly in the report header):

=Join(Parameters.YOURPARMNAME.Label, ",")

That will get you a comma-separated list of the labels (i.e. not the values, but what shows in the parm dropdown list) of however many user-selected parms there were (I don't know if you'll always have 5 or not).

Let us know if that works!

Cheers,
EJM
Post #1476697
Posted Tuesday, August 13, 2013 12:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, September 5, 2014 1:23 AM
Points: 4, Visits: 62
eric.muller (7/23/2013)
Are the groups always exactly the same as the parameter? E.g. Are the users selecting from a list of countries? Are the display values for the Parameter the same as what they'll be show in the report for the Group headers? In that case, you can try this (which should work in a text box directly in the report header):

=Join(Parameters.YOURPARMNAME.Label, ",")

That will get you a comma-separated list of the labels (i.e. not the values, but what shows in the parm dropdown list) of however many user-selected parms there were (I don't know if you'll always have 5 or not).

Let us know if that works!

Cheers,
EJM



Hello EJM,
thanks for the reply and yes users select the groups from the dropdownlist
and as far as JOIN is considered they have restricted me not to add any additional parameters.
which is the worst part orelse we could achieve this task easily
Post #1483568
Posted Tuesday, August 13, 2013 12:33 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 9:19 AM
Points: 304, Visits: 839
immu_20 (8/13/2013)
eric.muller (7/23/2013)
Are the groups always exactly the same as the parameter? E.g. Are the users selecting from a list of countries? Are the display values for the Parameter the same as what they'll be show in the report for the Group headers? In that case, you can try this (which should work in a text box directly in the report header):

=Join(Parameters.YOURPARMNAME.Label, ",")

That will get you a comma-separated list of the labels (i.e. not the values, but what shows in the parm dropdown list) of however many user-selected parms there were (I don't know if you'll always have 5 or not).

Let us know if that works!

Cheers,
EJM



Hello EJM,
thanks for the reply and yes users select the groups from the dropdownlist
and as far as JOIN is considered they have restricted me not to add any additional parameters.
which is the worst part orelse we could achieve this task easily


It seems you didn't understand what I was suggesting. The JOIN function is not a parameter; it will just list together in a character-delimited list (in this case a comma) whatever array you pass to it. In the case of this, it will take the labels of all the selected user parameters and then spit them out into a list, which I believe was your initial requirement. You're not adding a parameter, you're adding a text box, which should be acceptable.

Take a look at THIS link for more info, and good luck.

EJM
Post #1483899
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse