Yesterday I found an answer to Billy21 by Simon( 08/31/2005 02:13AM PDT) pointing out a solution on my problem: Trying to put datafields from a table into the footer of a MS Reporting Services report.
The answer was:
1) Are you referring to a table? If so then it's fairly simple to add fields to its detail/group headers and footers.
If it's a report header and footer, and you want to use a field from a dataset, then you need to use 2 text boxes. Put one in the report footer, and reference it to one within the detail section. E.g.
Footer - txtBox1.Value = "=ReportItems.txtBox2.Valu
e"
Detail - txtBox2.Value = "CStr("Version 1.0 (Created: " & CStr(First(Fields!Creation
Date.Value
, "ReportInfo")) & " Modified: " & CStr(First(Fields!Modified
Date.Value
, "ReportInfo")) & ")")"
There's a slight issue with dataset referencing in the footer or header in that if you want the textbox to repeat on each page then you will need to ensure that the textbox in the detail section is on every page. Best way to do this is to add an empty column on the end of your table, drag the textbox into the detail row field, and then make the text white. This way the header or footer can reference the textbox across all pages.
I tried with no success. Here are the boxes as generated in the XML file:
Textbox in the footer:
<Textbox Name="textbox59">
<Style>
<PaddingLeft>2pt</PaddingL
eft>
<PaddingBottom>2pt</Paddin
gBottom>
<PaddingTop>2pt</PaddingTo
p>
<PaddingRight>2pt</Padding
Right>
</Style>
<rd:DefaultName>textbox59<
/rd:Defaul
tName>
<Height>0.9cm</Height>
<Width>8.6cm</Width>
<Top>2.2cm</Top>
<CanGrow>true</CanGrow>
<Value>=ReportItems.shlste
dkomnr.Val
ue</Value>
<Left>4.6cm</Left>
</Textbox>
Reference to:
<Textbox Name="shlstedkomnr">
<Style>
<PaddingLeft>2pt</PaddingL
eft>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<FontSize>8pt</FontSize>
<PaddingBottom>2pt</Paddin
gBottom>
<PaddingTop>2pt</PaddingTo
p>
<PaddingRight>2pt</Padding
Right>
</Style>
<ZIndex>32</ZIndex>
<rd:DefaultName>shlstedkom
nr</rd:Def
aultName>
<Height>0.5cm</Height>
<Width>2.75cm</Width>
<Top>3.75cm</Top>
<CanGrow>true</CanGrow>
<Value>=First(Fields!shlst
edkomnr.Va
lue)</Valu
e>
<Left>12.25cm</Left>
</Textbox>
Both are ReportItems!
When building, this error message comes up:
The value expression for the textbox textbox59 contains an error: [BC30456] 'shlstedkomnr' is not a member of 'Microsoft.ReportingServic
es.ReportP
rocessing.
ReportObje
ctModel.Re
portItems'
.
What is wrong here?
Hopefully
Knut Urke
View the Solution FREE for 30 Days