Wednesday, March 28, 2012

No Fields in Page Header (and Footers)??

I'm a newbie with SSRS and I'd like to place a customer's name in the Page
Header section so that the customer's name (and ID number, and addresss)
appear at the top of every page in the right upper corner. But when I try to
put a field in the Page Header I get "Fields cannot be used in page headers
or footers."
Is MS kidding? Or am I just missing something?
So, how can I get a customer's info to appear at the top of every page?
(this is a regulated requirement).
Thanks for any help.Found this in BOL, but it seems ugly because I don't want the customer name
anywhere else in the body of the report, JUST in the Page Header. Is there
another workaround? (I still believe this is fundamental, core functionality
that should have been included)
In the expression, include references to report items on the page (for
example, you can reference a text box that contains data from a particular
field). Do not include a direct reference to fields in a data set.
You cannot refer directly to a field from a text box in a page header or
footer. (For example, you cannot use the expression =Fields!LastName.Value.)
To display field information in a page header or footer, place the field
expression in a text box in the body of the report, and then refer to that
text box in the page header or footer. The following expression displays the
contents of the first instance of a text box named TXT_LastName:
=First(ReportItems!TXT_LastName.Value)
"Don Miller" <nospam@.nospam.com> wrote in message
news:esBHBnQAIHA.1208@.TK2MSFTNGP03.phx.gbl...
> I'm a newbie with SSRS and I'd like to place a customer's name in the Page
> Header section so that the customer's name (and ID number, and addresss)
> appear at the top of every page in the right upper corner. But when I try
> to put a field in the Page Header I get "Fields cannot be used in page
> headers or footers."
> Is MS kidding? Or am I just missing something?
> So, how can I get a customer's info to appear at the top of every page?
> (this is a regulated requirement).
> Thanks for any help.
>|||Brian Welcker just had a blog post on this very subject:
http://blogs.msdn.com/bwelcker/archive/2007/06/19/marquee-moon-field-references-in-page-headers-and-footers.aspx
"Don Miller" <nospam@.nospam.com> wrote in message
news:esBHBnQAIHA.1208@.TK2MSFTNGP03.phx.gbl...
> I'm a newbie with SSRS and I'd like to place a customer's name in the Page
> Header section so that the customer's name (and ID number, and addresss)
> appear at the top of every page in the right upper corner. But when I try
> to put a field in the Page Header I get "Fields cannot be used in page
> headers or footers."
> Is MS kidding? Or am I just missing something?
> So, how can I get a customer's info to appear at the top of every page?
> (this is a regulated requirement).
> Thanks for any help.
>|||Thanks for the direction to Welcker's blog. I also tried putting the
field-associated textboxes in the report body (even though I didn't want
them there), referenced them in the header, and then hid them (visibility =false) and that seemed to work too.
Welcker's hidden parameters, referencing a field in the body, hiding
textboxes in the body, etc. are all non-obvious and non-intuitive HACKS.
I've spent at least an hour or so researching this issue, probably will go
back to the report later and forgot what all this was about or how I came up
with it. With Crystal Reports, it took all of five minutes to figure out,
was intuitive, and apparently they got around any issues MS encountered
('what happens when it grows?')
Same thing for Report vs. Page Headers. They exist as separate entities in
CR but rely on yet another hack to recreate in SSRS. And this is all in my
first hour with SSRS trying to migrate an existing CR report!
Such simple fundamental things in a report now require "programming" and
programmers. Good thing for MS the price is right :(
"Mike G." <m4053946_noSpam_@.yahoo.com> wrote in message
news:O89Kb3QAIHA.4592@.TK2MSFTNGP03.phx.gbl...
> Brian Welcker just had a blog post on this very subject:
> http://blogs.msdn.com/bwelcker/archive/2007/06/19/marquee-moon-field-references-in-page-headers-and-footers.aspx
> "Don Miller" <nospam@.nospam.com> wrote in message
> news:esBHBnQAIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> I'm a newbie with SSRS and I'd like to place a customer's name in the
>> Page Header section so that the customer's name (and ID number, and
>> addresss) appear at the top of every page in the right upper corner. But
>> when I try to put a field in the Page Header I get "Fields cannot be used
>> in page headers or footers."
>> Is MS kidding? Or am I just missing something?
>> So, how can I get a customer's info to appear at the top of every page?
>> (this is a regulated requirement).
>> Thanks for any help.
>|||:)
Report headers not being a separate entity did take a little getting used
to, but I wouldn't call it a hack to recreate them...
Mike
"Don Miller" <nospam@.nospam.com> wrote in message
news:eRs0UJRAIHA.4584@.TK2MSFTNGP03.phx.gbl...
> Thanks for the direction to Welcker's blog. I also tried putting the
> field-associated textboxes in the report body (even though I didn't want
> them there), referenced them in the header, and then hid them (visibility
> = false) and that seemed to work too.
> Welcker's hidden parameters, referencing a field in the body, hiding
> textboxes in the body, etc. are all non-obvious and non-intuitive HACKS.
> I've spent at least an hour or so researching this issue, probably will go
> back to the report later and forgot what all this was about or how I came
> up with it. With Crystal Reports, it took all of five minutes to figure
> out, was intuitive, and apparently they got around any issues MS
> encountered ('what happens when it grows?')
> Same thing for Report vs. Page Headers. They exist as separate entities in
> CR but rely on yet another hack to recreate in SSRS. And this is all in my
> first hour with SSRS trying to migrate an existing CR report!
> Such simple fundamental things in a report now require "programming" and
> programmers. Good thing for MS the price is right :(
>
> "Mike G." <m4053946_noSpam_@.yahoo.com> wrote in message
> news:O89Kb3QAIHA.4592@.TK2MSFTNGP03.phx.gbl...
>> Brian Welcker just had a blog post on this very subject:
>> http://blogs.msdn.com/bwelcker/archive/2007/06/19/marquee-moon-field-references-in-page-headers-and-footers.aspx
>> "Don Miller" <nospam@.nospam.com> wrote in message
>> news:esBHBnQAIHA.1208@.TK2MSFTNGP03.phx.gbl...
>> I'm a newbie with SSRS and I'd like to place a customer's name in the
>> Page Header section so that the customer's name (and ID number, and
>> addresss) appear at the top of every page in the right upper corner. But
>> when I try to put a field in the Page Header I get "Fields cannot be
>> used in page headers or footers."
>> Is MS kidding? Or am I just missing something?
>> So, how can I get a customer's info to appear at the top of every page?
>> (this is a regulated requirement).
>> Thanks for any help.
>>
>

No comments:

Post a Comment