Solved

ssrs data field in header

Posted on 2011-03-21
9
806 Views
Last Modified: 2012-05-11
I have a SSRS2005 report and one of the datasets has two data elements in it. The first is a report parameter and the second is a comment. This comment repeats for all of the report parameters. What I want to do is have this comment appear in the header. When I try using the 'First' directive SSRS tells me that fields cannot be in the header or footer. Is there any way to get around this restriction?
0
Comment
Question by:rwheeler23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 35186151
The data has to be in the main body of the report. So the next step is to hide (if you do not want to see it) the textbox that has the data that you want in the header and then in the header textbox use this type of code.
=ReportItems!MytextBoxName.Value
MytextBoxName is the name of the textbox that has the hide data in it.
The hidden textbox code will be something like:  =Fields!Comments.Value
0
 

Author Comment

by:rwheeler23
ID: 35195176
ReportItems!MytextBoxName.Value
It does not appear to know what the directive ReportItems is. Is this something that works in SSRS 2008?
0
 
LVL 27

Expert Comment

by:planocz
ID: 35195237
It works in 2005 I think it would work in 2008
0
Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

 

Author Comment

by:rwheeler23
ID: 35195239
Nevermind, I see that it is case sensitive. However, this is the text field I placed in the body. Even though I know that bchcomnt has a value, it always comes back blank.

=First(Fields!bchcomnt.Value, "BatchNumber")

0
 

Author Comment

by:rwheeler23
ID: 35195273
This is drinving me nuts. I just deployed the report and there is the comment. When I preview it under BIDS I do not see the comment.
0
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 35195287
with it being visible =true in your body that way you know that data is where.
if you have the the header right you should see the same data for testing
0
 
LVL 27

Expert Comment

by:planocz
ID: 35195293
Oh yea I forgot in 2005 you do not need to use the word  ---- First       in your code. only in 2008.
0
 
LVL 27

Expert Comment

by:planocz
ID: 35195316
If you use First in 2005 you will only get the first record and thats all. If the record is empty you will never see any data.
0
 

Author Comment

by:rwheeler23
ID: 35195370
Well I will live with in not appearing in BIDS because all the users will see is what appears in their browser. This comment, if it exists, is part of a batch in which all the transactions belong. So all I need is to see the first one. My report is set to give them a lookup by batch ID and that dataset contains the batch comment. Once they choose the batch, all the transactions in that batch are included on the report. I used the same technique for four other reports and the comment appears in all four of them in BIDS. It is just the first version where I do not see it in BIDS.

Thanks for all your help!
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Time Corrections for Reports Working with a report, we made some interesting discoveries about the time corrections/updates We are using the following Parameters: Starting Entered Date (Date) formatted as Data type: "Date/Time" Ending Entered …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question