all groups > sql server reporting services > august 2005 >
You're in the

sql server reporting services

group:

Is there any way to use fields in a Header and/or Footer sections


Is there any way to use fields in a Header and/or Footer sections Sirish Saxena
8/12/2005 9:07:04 AM
sql server reporting services:
I am New to reporting services and do not know most of it but the first
hurdle that i have encountered is of how to use a fields in a header/footer
section. the requirement that i have reports forces me to use fields but RS
does not allow it.
Re: Is there any way to use fields in a Header and/or Footer secti Sirish Saxena
8/12/2005 10:03:05 AM
thanks i am trying to print a company logo as this is not a numeric datatype
how would i use a aggregate function.....if you can give me an example that
will be a great help.
Also I was thinking more in lines of declaring a vriable and storing a field
value in it and then assigning it to an Image item.......the only problem
hereis i do not know how to do declare a variable


[quoted text, click to view]
Re: Is there any way to use fields in a Header and/or Footer sections Bruce L-C [MVP]
8/12/2005 11:53:29 AM
You can do this but you have to use either an aggrate (sum, count) or first.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: Is there any way to use fields in a Header and/or Footer secti Bruce L-C [MVP]
8/12/2005 12:35:55 PM
Is the data you want in a field in the dataset? That is what I thought you
were looking for. Note I said aggragate OR use first. Use the expression
builder and it should suggest using first.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: Is there any way to use fields in a Header and/or Footer secti Sirish Saxena
8/16/2005 6:12:03 AM
Ok, i will expllain the whole situation. I i am storing Logos of different
companies in a MS SQL DB, now i want to assign this filed to an Image. The
Image item is in a Header section. Header Section does not allow to refer to
any fields, which is where my problem starts. I do not want to move header to
body as that will print logo at all pages. I have tried First but it errors
out. So again my question is is there any way i can work around this? I was
also thinking if there is any way that i can defined a variable (much like in
VB or C#) ans assign the logo field to this variable and then assign the
variable to the image field, but i do not know how to declare a variable in
Reporting Services and then use it in header section.
Re: Is there any way to use fields in a Header and/or Footer secti timseal
8/16/2005 8:34:12 AM
What is the error message?
What is the expression you are using that doesn't work?

=First(Fields!fieldname.Value) should work, or you may need
=First(Fields!fieldname.Value, "datasetname") when working with
multiple datasets.
Re: Is there any way to use fields in a Header and/or Footer secti Sirish Saxena
8/17/2005 11:08:07 AM
I know the use of a FIRST and multiple datasets ....my Question is: How to
use a field in Page Header? Reporting Service does not allow to use Fields in
Page Header so, i was wondering if there is any workaround?

[quoted text, click to view]
Re: Is there any way to use fields in a Header and/or Footer secti timseal
8/18/2005 9:46:53 AM
In Bruce's first post, he said you can do this.
If you are having trouble, please be specific. 'Errors out' is not
helpful.
Re: Is there any way to use fields in a Header and/or Footer secti capricorn
10/17/2005 7:23:03 AM
I had the same problem. Please confirm that the only way to use Fields in the
Page Header is to use an aggregate function. So what you are telling us is
that Reporting Services cannot display a field from a dataset on every page
of the report. Read below.

I am trying to display a calculated field in the Page Header for every page.
I have tried the suggestions written, but the textbox only appears on the
Page Header on the last page of the report.

For example, textbox29 in the body of my report is:
=First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")

In the Page Header, I just display the textbox:
=ReportItems!textbox29.value

The result only appears on the last page of the report. How can this result
appear on every page of the report? I tried using RepeatWith, but that did
nothing. Please help. Thanks.

--
-RB
:)


[quoted text, click to view]
AddThis Social Bookmark Button