Wednesday, March 21, 2012
Dataset Field in Page/Table Header
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>
Friday, February 17, 2012
Database views hierarchy
In my SQL Server databases I have complex related tables and views.
There is any tool which allow you to see (print) this complex hierarchy of
views and tables as hierarchical tree?
Thanks,
GBHave you tried the SQL Server Diagraming tools ? This will at least be
able to give you data model to work with. I recall somewhere that
coding some nifty SQL SMO may help.
MJKulangara
http://sqladventures.blogspot.com|||I tried to create database diagrams but it shows table relations only.
GB
"MJKulangara" <RutgersDBA@.gmail.com> wrote in message
news:1138914523.816837.42350@.o13g2000cwo.googlegro ups.com...
> Have you tried the SQL Server Diagraming tools ? This will at least be
> able to give you data model to work with. I recall somewhere that
> coding some nifty SQL SMO may help.
> MJKulangara
> http://sqladventures.blogspot.com|||GB (v7v1k3@.hotmail.com) writes:
> In my SQL Server databases I have complex related tables and views.
> There is any tool which allow you to see (print) this complex hierarchy of
> views and tables as hierarchical tree?
There are several data-modelling tools on the market, that are quite
more eloquent and powerful than the built-in diagamming in SQL Server.
They are also more expensive...
Anyway, the leaders in this field are PowerDesigner (from Sybase), ErWin
(now from Computer Associates) and Embrocadero's tool. I use PowerDesigner
myself, but I don't think it has that much support for showing relation
for views, actually. Then again, I use views very little, so I may have
missed how it works.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx