Showing posts with label aggregate. Show all posts
Showing posts with label aggregate. Show all posts

Wednesday, March 7, 2012

Displaying Aggregate Values in Header on every page

Hi all.
Product: SQL Server 2000 Reporting Services Service Pack
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
:)Can someone please respond to this question? I appreciate it. Thanks.
--
-RB
:)
"capricorn" wrote:
> Hi all.
> Product: SQL Server 2000 Reporting Services Service Pack
> 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
> :)|||It sounds like you have a data region (matrix, table, list) above textbox29
in the report layout that will grow to multiple pages at runtime. You could
set the RepeatWith value of textbox29 to the name of that particular data
region that expands over many pages - also try putting textbox29 right next
to that data region. The value should then repeat on all these pages and
will be available in the page header/footer also. BTW: you could set the
textbox29 Visibility to be always hidden - the value will still show up in
the page header/footer, but it will be hidden in the report body.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> Can someone please respond to this question? I appreciate it. Thanks.
> --
> -RB
> :)
>
> "capricorn" wrote:
>> Hi all.
>> Product: SQL Server 2000 Reporting Services Service Pack
>> 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
>> :)|||Robert,
I tried putting textbox29 next to table1 with the repeatwith option pointing
to table1 and this time the value of textbox29 only appears on this first
page. I tried putting textbox29 before table1 and the value still only
appears on the first page. The textbox value is not repeating with the table
that is spanning multiple pages.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> It sounds like you have a data region (matrix, table, list) above textbox29
> in the report layout that will grow to multiple pages at runtime. You could
> set the RepeatWith value of textbox29 to the name of that particular data
> region that expands over many pages - also try putting textbox29 right next
> to that data region. The value should then repeat on all these pages and
> will be available in the page header/footer also. BTW: you could set the
> textbox29 Visibility to be always hidden - the value will still show up in
> the page header/footer, but it will be hidden in the report body.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> > Can someone please respond to this question? I appreciate it. Thanks.
> > --
> > -RB
> > :)
> >
> >
> > "capricorn" wrote:
> >
> >> Hi all.
> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> 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
> >> :)
>
>|||Which output format are you using? Note: RepeatWith for duplicating items in
the report body is only supported for physical page oriented renderers (such
as PDF), but at this point not for interactive renderers such as HTML.
I assume the textbox is sitting parallel to the table (not above and not
below). The correct value of that textbox should still be available in the
page header/footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> Robert,
> I tried putting textbox29 next to table1 with the repeatwith option
> pointing
> to table1 and this time the value of textbox29 only appears on this first
> page. I tried putting textbox29 before table1 and the value still only
> appears on the first page. The textbox value is not repeating with the
> table
> that is spanning multiple pages.
> --
> -RB
> :)
>
> "Robert Bruckner [MSFT]" wrote:
>> It sounds like you have a data region (matrix, table, list) above
>> textbox29
>> in the report layout that will grow to multiple pages at runtime. You
>> could
>> set the RepeatWith value of textbox29 to the name of that particular data
>> region that expands over many pages - also try putting textbox29 right
>> next
>> to that data region. The value should then repeat on all these pages and
>> will be available in the page header/footer also. BTW: you could set the
>> textbox29 Visibility to be always hidden - the value will still show up
>> in
>> the page header/footer, but it will be hidden in the report body.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
>> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
>> > Can someone please respond to this question? I appreciate it. Thanks.
>> > --
>> > -RB
>> > :)
>> >
>> >
>> > "capricorn" wrote:
>> >
>> >> Hi all.
>> >> Product: SQL Server 2000 Reporting Services Service Pack
>> >> 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
>> >> :)
>>|||Robert,
I am looking at the Preview page within the Designer. As you suggested, I
put the textbox next to the table and the textbox value is available on the
Page Header of the first page. The textbox value does not repeat on
subsequent page headers.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> Which output format are you using? Note: RepeatWith for duplicating items in
> the report body is only supported for physical page oriented renderers (such
> as PDF), but at this point not for interactive renderers such as HTML.
> I assume the textbox is sitting parallel to the table (not above and not
> below). The correct value of that textbox should still be available in the
> page header/footer.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> > Robert,
> > I tried putting textbox29 next to table1 with the repeatwith option
> > pointing
> > to table1 and this time the value of textbox29 only appears on this first
> > page. I tried putting textbox29 before table1 and the value still only
> > appears on the first page. The textbox value is not repeating with the
> > table
> > that is spanning multiple pages.
> > --
> > -RB
> > :)
> >
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> It sounds like you have a data region (matrix, table, list) above
> >> textbox29
> >> in the report layout that will grow to multiple pages at runtime. You
> >> could
> >> set the RepeatWith value of textbox29 to the name of that particular data
> >> region that expands over many pages - also try putting textbox29 right
> >> next
> >> to that data region. The value should then repeat on all these pages and
> >> will be available in the page header/footer also. BTW: you could set the
> >> textbox29 Visibility to be always hidden - the value will still show up
> >> in
> >> the page header/footer, but it will be hidden in the report body.
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> >> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> >> > Can someone please respond to this question? I appreciate it. Thanks.
> >> > --
> >> > -RB
> >> > :)
> >> >
> >> >
> >> > "capricorn" wrote:
> >> >
> >> >> Hi all.
> >> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> >> 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
> >> >> :)
> >>
> >>
> >>
>
>

Friday, February 24, 2012

Display Row Data As Cols

I have data in rows that I need to aggregate and display in a columnar fashion and I haven't been able to figure out how to do it. A simplified version of the data as it is stored in the table:

Station Month Day Reading

1 1 1 100

1 1 2 200

1 1 3 300

1 2 1 400

1 2 2 500

And I would like to create a query that returns:

Station Month Day 1 Day 2 Day 3

1 1 100 200 300

1 2 400 500

Any help you can provide or tips to steer me in the right direction are much appreciated.

Dianne Siebold

Are you looking for something like this?

http://msdn2.microsoft.com/en-us/library/ms177410.aspx

|||That is very cool. I'm using SQL Server 2005 but I need to maintain query compatibility with Oracle so I'm looking for something that uses joins or maybe case statements to make it more portable.|||

Then maybe the responses in this thread might be helpful for you

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=438605&SiteID=1

Starting from the second reply by limno.

|||I'm working on using that query logic but I'm just not getting how I can apply it to my query. I'll let you now if I have any success. Thanks!|||I think I got it. I was able to take the concepts from the thread you referred me to and use them in another query. Thanks!