Hi,
I want to print a field in the page header. Since there is no option in RS
to include a database field in Page Header, I placed the Field in a Table
header and set the the Repeat Header on Each Page Property. But it prints
the first value of the record on all page. Is it anyway to print the
database fields dynamically on the page header or table header.
TIA,
SamuelThe ReportItems!<ReportItemName>.Value syntax will allow you to do this. See
the sample report at the end of this posting. Also see the "Using Global
Collections" topic in SQL Server 2000 Reporting Services BOL (Books Online).
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Samuel" <samuel@.photoninfotech.com> wrote in message
news:ehqgckWdEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I want to print a field in the page header. Since there is no option in RS
> to include a database field in Page Header, I placed the Field in a Table
> header and set the the Repeat Header on Each Page Property. But it prints
> the first value of the record on all page. Is it anyway to print the
> database fields dynamically on the page header or table header.
> TIA,
> Samuel
>
ReportItemsSample.rdl
--
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefini
tion"
xmlns:rd="">http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<PageHeader>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Top>0.125in</Top>
<rd:DefaultName>textbox2</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.75in</Width>
<CanGrow>true</CanGrow>
<Value>=ReportItems!textbox1.Value</Value>
<Left>0.25in</Left>
</Textbox>
</ReportItems>
<PrintOnLastPage>true</PrintOnLastPage>
<PrintOnFirstPage>true</PrintOnFirstPage>
<Style />
<Height>0.5in</Height>
</PageHeader>
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Textbox Name="textbox1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Top>0.25in</Top>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.25in</Height>
<Width>1.75in</Width>
<CanGrow>true</CanGrow>
<Value>Some Text in the Body. This could be a field reference (i.e.
=Fields!FieldName.Value)</Value>
<Left>0.25in</Left>
</Textbox>
</ReportItems>
<Style />
<Height>1.875in</Height>
</Body>
<TopMargin>1in</TopMargin>
<Width>6.50001in</Width>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>d14a8b9b-cb8d-481b-8351-98a44abce6d7</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>