Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pull Value from DataSet to display in Report Header 1

Status
Not open for further replies.

ousoonerjoe

Programmer
Jun 12, 2007
925
US
I have a field in my DataSet that I want to display the First instance returned.
Code:
=First(Fields!NDate.Value)
However, i get the error:
Error: The Value expression for the textbox ‘textbox7’ refers to a field. Fields cannot be used in page headers or footers.
What's the best way to get around this?

As always any tips, comments, suggestions are welcome and appreciated. Thank you.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
I found a work around. Maybe not the best way, but it works:
Added a second Table Header Line to the First Table.
Placed the field there.
Made sure it printed at the top of every page. (it just blends into the Report Header at the top of every page now.)

Report is all pretty for management.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
Think the "standard" workaround for this is to put the result in a textbox in the main body of the report and make it invisible (no borders, white text etc)

Then use the ReportItems collection to reference it from the header

=ReportItems!TextboxName.Value

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thanks, xlbo. I'll try that next time.

"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
 
I handle this by create a paramter, set Prompt: to Hidden and set the Default value to whatever field in your dataset you want to display.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top