Hi,
I'm trying - without results - to introduce pagenumbers in my reports
which are made by using the template "Report Model Project" of Visual
Studio 2005. I'm using SQL Server 2005 Reporting Services. Does anybody
know if this is possible en if so how to do it?=20
Ren=E9Ren,
You'll need to add a text box to the page footer then set the Expression of
the textbox to
=Globals!PageNumber
or this type of thing is more friendly:
="Page " + cstr(Globals!PageNumber) + " of " + cstr(Globals!TotalPages)
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com|||Hello Paul,
Thanks for your solution, but I can not use it. Your solution is OK
when using the template "Report Server Project" and not for the
template "Report Model Project" of Visual Studio 2005 as I'm using. It
looks that for the "Report Model Project" it is impossible to add a
textbox, a header and/or a footer. I think it is impossible to add a
page number. I hope I'm wrong about this. =20
Ren=E9|||Hi Ren,
I must be missing something here. The report model projects I've created are
essentially data universes, and contain no reports. However, reports can
subsequently be created which relate to these reports using the Report
Builder - presumably you are referring to these reports? If this is the
case, you can edit the rdl for these reports. It's not nice, but you could
add a pageFooter element at the bottom (before the </Report> element). For a
simple page number it would look something like that below. I'll find out
for you if there is a way this can be done using the BIDS GUI.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
<PageFooter>
<ReportItems>
<Textbox Name="textbox6">
<Left>2.5cm</Left>
<Top>0.25cm</Top>
<rd:DefaultName>textbox6</rd:DefaultName>
<Width>2.53968cm</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Globals!PageNumber</Value>
</Textbox>
</ReportItems>
<Height>0.88492cm</Height>
<PrintOnLastPage>true</PrintOnLastPage>
<PrintOnFirstPage>true</PrintOnFirstPage>
</PageFooter>|||Hello Paul,
It works! Thanks.
After using Report Builder I've opened a XML editor and I've added and
adjusted your code. =20
Ren=E9|||Good news. Keep an eye on this thread though because I'll update it when I
find out definitively if there is an easier way to achieve this through the
BIDS GUI.
Regards,
Paul Ibison
No comments:
Post a Comment