Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Thursday, March 29, 2012

DataType Money

Please i need to display the money column in DataBase in an asp.net page but i get something like this 786.0000 how can i format it so that i get something like 786.00

Thanx

That kind of formatting is best done at the application level.|||

You could use the ToString("c") to display as currency on your page.

Double TotalCost = 786.0000;

lblCost.Text = TotalCost.ToString("c");

Your label should now be set to $786.00

|||

If you are binding it, you can use <%# Bind("YourColumnName","{0:c}") %> and will display $786.00
If you dont want to display the currency, repace c with your own format like #0.00 at it should display 786.00

Tuesday, March 27, 2012

Datasource to Populate DDL - then choose item

I've got a page with a SQLDataSource control successfully populating a Dropdownlist...

However, now I find I need extended functionality - so I've got another page with links to this page, using querystrings - I need to hit the page, check the querystring, and if it's blank, just continue, but if the querystring is populated, then choose that item.

I've tried the page_load and the page_prerender, but so far, it's not working:
CC = Request.QueryString("center")
If CC <>""Then
' DropDownList1.Items.FindByText(CC).Selected = True
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText(CC))
End if

I've double checked, and yes, every time CC is populated, that item is definitely in the dropdownlist - it just doesn't get changed to that item.

ideas?

EndIf

Here's an example for you:

ASPX

<asp:dropdownlist id="ddlPets" runat="server" ondatabound="ddlPets_DataBound"></asp:dropdownlist><br /><br /><asp:hyperlink id="hypDog" runat="server" navigateurl="1131233.aspx?pet=Dog" text="Pre-select Dog" /><br /><asp:hyperlink id="hypCat" runat="server" navigateurl="1131233.aspx?pet=Cat" text="Pre-select Cat" /><br /><asp:hyperlink id="hypGoldfish" runat="server" navigateurl="1131233.aspx?pet=Goldfish"text="Pre-select Goldfish" /><br />

CODE-BEHIND

protected void Page_Load(object sender, EventArgs e){if (!this.IsPostBack){string[] pets = {"Dog","Cat","Goldfish" };ddlPets.DataSource = pets;ddlPets.DataBind();}}protected void ddlPets_DataBound(object sender, EventArgs e){if (this.Request["Pet"] ==null) {return; }ddlPets.SelectedIndex = ddlPets.Items.IndexOf(ddlPets.Items.FindByValue(this.Request["Pet"]));}
|||

using the databound even worked

sql

Thursday, March 22, 2012

DataSet rows being deleted, but after the update , the sql database is not updated. The de

Stepping thru the code with the debugger shows the dataset rows being deleted.

After executing the code, and getting to the page presentation. Then I stop the debug and start the

page creation process again ( Page_Load ). The database still has the original deleted dataset rows.

Adding rows works, then updating works fine, but deleting rows, does not seem to work.

The dataset is configured to send the DataSet updates to the database. Use the standard wizard to create the dataSet.


cDependChildTA.Fill(cDependChildDs._ClientDependentChild, UserId);

rowCountDb = cDependChildDs._ClientDependentChild.Count;

for (row = 0; row < rowCountDb; row++)
{

dr_dependentChild = cDependChildDs._ClientDependentChild.Rows[0];
dr_dependentChild.Delete();


//cDependChildDs._ClientDependentChild.Rows.RemoveAt(0);

//cDependChildDs._ClientDependentChild.Rows.Remove(0);
/* update the Client Process Table Adapter*/
// cDependChildTA.Update(cDependChildDs._ClientDependentChild);
// cDependChildTA.Update(cDependChildDs._ClientDependentChild);

}

/* zero rows in the DataSet at this point */

/* update the Child Table Adapter */
cDependChildTA.Update(cDependChildDs._ClientDependentChild);

Hi,

You should use AcceptChanges method after using delete in order to update the data. The following link may be helpful to you.

http://msdn2.microsoft.com/en-us/library/ms233823(VS.80).aspx

Thanks.

Dataset Query using Parameters

OK. I've got a tough one here. I am attempting to create a parameter .aspx
page that will pass in start date, end date and multiple storeIDs to the
report. A section of my query in the report dataset looks like this:
WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN @.paramStartDate AND
@.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN (@.paramStore))
The problem is at the end with the @.paramStore. It works if you pass it
just one StoreID. The syntax becomes ...StoreID IN ('1')
When you try to pass it more than one storeid, it blows up. The syntax
becomes ...StoreID IN ('1,2') and an error comes up saying that it cannot
convert '1,2' to datatype int. Is there a way to take these leading and
trailing apostrophes off or can you think of a workaround? Thanks.You have to do a dynamically generated SQL statement, like this:
= "SELECT ... WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN
@.paramStartDate AND > @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN
(" & @.paramStore & "))"
It builds the SQL statement on the fly, so you won't be able to use the
query designer after this. I may not have put the quotes in properly, but I
hope you get the idea.
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"BrianW" <BrianW@.discussions.microsoft.com> wrote in message
news:9FF1DC3A-463D-41BB-9130-631A5D0600FF@.microsoft.com...
> OK. I've got a tough one here. I am attempting to create a parameter
> .aspx
> page that will pass in start date, end date and multiple storeIDs to the
> report. A section of my query in the report dataset looks like this:
> WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN @.paramStartDate AND
> @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN (@.paramStore))
> The problem is at the end with the @.paramStore. It works if you pass it
> just one StoreID. The syntax becomes ...StoreID IN ('1')
> When you try to pass it more than one storeid, it blows up. The syntax
> becomes ...StoreID IN ('1,2') and an error comes up saying that it cannot
> convert '1,2' to datatype int. Is there a way to take these leading and
> trailing apostrophes off or can you think of a workaround? Thanks.|||Thanks Jeff but I can't seem to get this to work. It changes my quotation
marks to brackets and comes up with error "Identifier expected."
"Jeff A. Stucker" wrote:
> You have to do a dynamically generated SQL statement, like this:
> = "SELECT ... WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN
> @.paramStartDate AND > @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN
> (" & @.paramStore & "))"
> It builds the SQL statement on the fly, so you won't be able to use the
> query designer after this. I may not have put the quotes in properly, but I
> hope you get the idea.
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "BrianW" <BrianW@.discussions.microsoft.com> wrote in message
> news:9FF1DC3A-463D-41BB-9130-631A5D0600FF@.microsoft.com...
> > OK. I've got a tough one here. I am attempting to create a parameter
> > .aspx
> > page that will pass in start date, end date and multiple storeIDs to the
> > report. A section of my query in the report dataset looks like this:
> >
> > WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN @.paramStartDate AND
> > @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN (@.paramStore))
> >
> > The problem is at the end with the @.paramStore. It works if you pass it
> > just one StoreID. The syntax becomes ...StoreID IN ('1')
> >
> > When you try to pass it more than one storeid, it blows up. The syntax
> > becomes ...StoreID IN ('1,2') and an error comes up saying that it cannot
> > convert '1,2' to datatype int. Is there a way to take these leading and
> > trailing apostrophes off or can you think of a workaround? Thanks.
>
>|||My advice in this situation is to back up and make sure you can create the
appropriate string.
Create a report that has the report parameters and a textbox and nothing
else. In the textbox put in the expression. Now you should be able to copy
and paste the result into query analyzer and it should work. Sometimes just
seeing the result will let you know what you are doing wrong.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"BrianW" <BrianW@.discussions.microsoft.com> wrote in message
news:7236F404-0AB1-44C6-97A1-A601A1E2B738@.microsoft.com...
> Thanks Jeff but I can't seem to get this to work. It changes my quotation
> marks to brackets and comes up with error "Identifier expected."
> "Jeff A. Stucker" wrote:
> > You have to do a dynamically generated SQL statement, like this:
> >
> > = "SELECT ... WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN
> > @.paramStartDate AND > @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID
IN
> > (" & @.paramStore & "))"
> >
> > It builds the SQL statement on the fly, so you won't be able to use the
> > query designer after this. I may not have put the quotes in properly,
but I
> > hope you get the idea.
> >
> > Cheers,
> >
> > '(' Jeff A. Stucker
> > \
> >
> > Business Intelligence
> > www.criadvantage.com
> > ---
> > "BrianW" <BrianW@.discussions.microsoft.com> wrote in message
> > news:9FF1DC3A-463D-41BB-9130-631A5D0600FF@.microsoft.com...
> > > OK. I've got a tough one here. I am attempting to create a parameter
> > > .aspx
> > > page that will pass in start date, end date and multiple storeIDs to
the
> > > report. A section of my query in the report dataset looks like this:
> > >
> > > WHERE (dbo.SalesCheckDetails.SalesDate BETWEEN @.paramStartDate AND
> > > @.paramEndDate) AND (dbo.SalesCheckDetails.StoreID IN (@.paramStore))
> > >
> > > The problem is at the end with the @.paramStore. It works if you pass
it
> > > just one StoreID. The syntax becomes ...StoreID IN ('1')
> > >
> > > When you try to pass it more than one storeid, it blows up. The
syntax
> > > becomes ...StoreID IN ('1,2') and an error comes up saying that it
cannot
> > > convert '1,2' to datatype int. Is there a way to take these leading
and
> > > trailing apostrophes off or can you think of a workaround? Thanks.
> >
> >
> >

Wednesday, March 21, 2012

Dataset filtering... how?

Hi all,

I want to create a summary page for one of my report, depending on a
parameter, I would like to filter the dataset before creating the summary
fields.

I cannot figure out how to perform this filtering, my approach has been to
insert a Table control and map it to my dataset, then try and do some
filtering via the properties. When i then put something like

=sum(Fields!Sales.Value)

into the header (such that it is shown only once, not repeated), I get the
sum for the full dataset, not the filtered one.

Please help, is there any easier way todo this?

Lastly, I can't filter at the SQL level as the dataset is being used to
populate a chart below the summary.

Advice welcome.

Please help
Taz

Put the filter directly on the table (by opening the table properties dialog and selecting the filter tab).

Small sample report is attached at the bottom.

-- Robert

============================================================

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="AdventureWorks">
<DataSourceReference>AdventureWorks</DataSourceReference>
<rd:DataSourceID>c2dc0e71-020b-48e3-9005-53286c923eb2</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Table Name="table1">
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<ZIndex>3</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Sum</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="value_1">
<rd:DefaultName>value_1</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Sum(Fields!value.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
<Filters>
<Filter>
<Operator>NotEqual</Operator>
<FilterValues>
<FilterValue>=2</FilterValue>
</FilterValues>
<FilterExpression>=Fields!id.Value</FilterExpression>
</Filter>
</Filters>
<DataSetName>DataSet1</DataSetName>
<Top>0.125in</Top>
<Width>4.33333in</Width>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="id">
<rd:DefaultName>id</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!id.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="value">
<rd:DefaultName>value</rd:DefaultName>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!value.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>id</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
</TableColumns>
<Height>0.75in</Height>
</Table>
</ReportItems>
<Height>1in</Height>
</Body>
<rd:ReportID>427ef1de-ff4a-42ab-96eb-9b4fbdc898e0</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>select 1 as id, 5 as value union
select 2, 6 union
select 3, 7</CommandText>
<DataSourceName>AdventureWorks</DataSourceName>
</Query>
<Fields>
<Field Name="id">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>id</DataField>
</Field>
<Field Name="value">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>value</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>4.5in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>

Dataset filtering... how?

Hi all,
I want to create a summary page for one of my report, depending on a
parameter, I would like to filter the dataset before creating the summary
fields.
I cannot figure out how to perform this filtering, my approach has been to
insert a Table control and map it to my dataset, then try and do some
filtering via the properties. When i then put something like
=sum(Fields!Sales.Value)
into the header (such that it is shown only once, not repeated), I get the
sum for the full dataset, not the filtered one.
Please help, is there any easier way todo this?
Lastly, I can't filter at the SQL level as the dataset is being used to
populate a chart below the summary.
Advice welcome.
Please help
TazIn the table properties you need to go to the Filter tab. You will then be
able to select the dataset field you want from the drop-down list and then
set what value(s) you want to include in the table.
HTH, Magendo_man
"Tarun Mistry" wrote:
> Hi all,
> I want to create a summary page for one of my report, depending on a
> parameter, I would like to filter the dataset before creating the summary
> fields.
> I cannot figure out how to perform this filtering, my approach has been to
> insert a Table control and map it to my dataset, then try and do some
> filtering via the properties. When i then put something like
> =sum(Fields!Sales.Value)
> into the header (such that it is shown only once, not repeated), I get the
> sum for the full dataset, not the filtered one.
> Please help, is there any easier way todo this?
> Lastly, I can't filter at the SQL level as the dataset is being used to
> populate a chart below the summary.
> Advice welcome.
> Please help
> Taz
>
>|||Thanks for ther reply.
I found that actually filtering directly on the dataset was my best option
(within the Data tab). My charts are working correctly on the condensed
data.
Taz
"magendo_man" <magendoman@.discussions.microsoft.com> wrote in message
news:C9DCDE28-059B-472C-BC4B-EDEC09C4E1B7@.microsoft.com...
> In the table properties you need to go to the Filter tab. You will then be
> able to select the dataset field you want from the drop-down list and then
> set what value(s) you want to include in the table.
> HTH, Magendo_man
> "Tarun Mistry" wrote:
>> Hi all,
>> I want to create a summary page for one of my report, depending on a
>> parameter, I would like to filter the dataset before creating the summary
>> fields.
>> I cannot figure out how to perform this filtering, my approach has been
>> to
>> insert a Table control and map it to my dataset, then try and do some
>> filtering via the properties. When i then put something like
>> =sum(Fields!Sales.Value)
>> into the header (such that it is shown only once, not repeated), I get
>> the
>> sum for the full dataset, not the filtered one.
>> Please help, is there any easier way todo this?
>> Lastly, I can't filter at the SQL level as the dataset is being used to
>> populate a chart below the summary.
>> Advice welcome.
>> Please help
>> Taz
>>

Dataset Field in Page/Table Header

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>

Sunday, March 11, 2012

Datagrid and sql query isssue. Revenue reporting system

Hi-

I am trying to develop a page that pulls all customers from a database and display the revenue for each customer for each day I query in a months time.

I am able to pull out the revenue for one day in the month and display it in the column with the appropriate revenue next to the customer name.

My problem is two things.

1. It only displays customers that actually have revenue. So how would I get my datagrid to display all customers regardless if they have revenue in the database.

2. I need to be able to display more than 1 day in columns format. For example

Customer | Day1 | Day 2 |
----------
Acme Inc | $2200. |$1300.

Here is my sql code that pulls out the customers that have revenue and displays one day between a specific set of dates.

SQL = "SELECT pb_customers.customer_name AS 'customer', sum(pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost) as 'total' FROM pb_report_shippers INNER JOIN pb_jobs ON pb_report_shippers.job_id = pb_jobs.job_id INNER JOIN pb_customers ON pb_jobs.customer_id = pb_customers.customer_id WHERE pb_report_shippers.shipper_date_time between cast('9/01/03' as datetime) and cast('9/02/03' as datetime) AND job_completed = '1' GROUP by pb_customers.customer_name"

Any help would be appreciated

ThanksTo get all customers, you'll want a left outer join for your related tables. Then try something like this


SELECT pb_customers.customer_name AS 'customer',
sum(case (when day(pb_report_shippers.shipper_date_time) = 1
then pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
else 0
end) as day1,
sum(case (when day(pb_report_shippers.shipper_date_time) = 2
then pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
else 0
end) as day2,
... and so on

FROM pb_report_shippers
Left outer JOIN pb_jobs ON pb_report_shippers.job_id = pb_jobs.job_id
left outer JOIN pb_customers ON pb_jobs.customer_id = pb_customers.customer_id WHERE pb_report_shippers.shipper_date_time between cast('9/01/03' as datetime) and cast('9/02/03' as datetime) AND job_completed = '1' GROUP by pb_customers.customer_name

HTH|||Thanks for the reply.

I am confused about this line.

sum(case (when day(pb_report_shippers.shipper_date_time) = 1

then pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost

else 0

end) as day1,

What does the "1" represent. Am I supposed to put the datevalue I am looking for right there? When I do i get an error with the "when" keyword.|||The DAY() function returns the DD portion of MM/DD/YYYY. So, for 10/23/2003 it would contain 23. I don't think this is exactly what you are looking for, but the methodology should work. Instead I would use the DATEDIFF() function.


SELECT
pb_customers.customer_name AS 'customer',
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,CAST('9/01/03' AS datetime)) = 1
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day1,
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,CAST('9/01/03' AS datetime)) = 2
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day2,
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,cast('9/01/03' AS datetime)) = 3
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day3,
... and so on
FROM
pb_report_shippers
LEFT OUTER JOIN
pb_jobs ON pb_report_shippers.job_id = pb_jobs.job_id
LEFT OUTER JOIN
pb_customers ON pb_jobs.customer_id = pb_customers.customer_id
WHERE
pb_report_shippers.shipper_date_time between cast('9/01/03' as datetime) and cast('9/02/03' as datetime) AND
job_completed = '1'
GROUP BY
pb_customers.customer_name

Terri|||thanks for the help. I am getting closer to what I need.

One thing that is still occuring however is it only displays the customers that have revenue. It wont display all customers regardless is no revenue is found in the database. Is this what the left outer join is suppoesed to handle. What does it doe exactly compated to a normal Inner join.|||The left outer join should accomplish this. experiment a bit and comment out the


LEFT OUTER JOIN

pb_customers ON pb_jobs.customer_id = pb_customers.customer_id


and any related columns of the query to see if you get the same results. This should help you track down why not all customers are showing up.|||Then I would restruture slightly. I would make the primary table you are pulling from your customers table, and I would LEFT OUTER join your shippers table. Like this (untested but hopefully it's close):

SELECT
pb_customers.customer_name AS 'customer',
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,CAST('9/01/03' AS datetime)) = 1
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day1,
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,CAST('9/01/03' AS datetime)) = 2
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day2,
SUM(
CASE
WHEN DATEDIFF(d,pb_report_shippers.shipper_date_time,cast('9/01/03' AS datetime)) = 3
THEN pb_report_shippers.total_ext_price + pb_report_shippers.setup_cost
ELSE 0
END
) AS day3,
... and so on
FROM
pb_customers
LEFT OUTER JOIN
pb_jobs ON pb_jobs.customer_id = pb_customers.customer_id AND pb_report_shippers.shipper_date_time BETWEEN CAST('9/01/03' as datetime) AND CAST('9/02/03' as datetime) AND
job_completed = '1'
LEFT OUTER JOIN
pb_report_shippers ON pb_report_shippers.job_id = pb_jobs.job_id
GROUP BY
pb_customers.customer_name

Thursday, March 8, 2012

Datafields in report header

Hi.

I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

How can I do this?

Regards, Tomsi

Hi Tomsi,

you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

you can refer to this hidden field content using the similar syntax

=ReportItems!txt_1.Value

and display in a text box placed in the header.

Rgds,

Ramesh

|||

Nice workaround. Thanks.

But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

The ideal solution would be have a databound table in the header...

Tomsi

|||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
Then, in the report header reference the parameter value.

-- Robert

|||

I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

|||

The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

M

|||

Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

Then the parameters can be put in the Page Header.

Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

Dave

|||

I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

Header before exporting to PDF:

Title: This Should be Easier Date: 5/19/06

Header after exporting to PDF:

Title: Date:

Is there any way to fix this?

|||

This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

|||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

Frank
|||

I have a few clients who love SRS but almost dropped it because of this.

We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

Either way it's a huge pain in the ^$% for what should be a simple task.

I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

Dave

|||

I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank|||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank|||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank|||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  • Datafields in report header

    Hi.

    I want some information stored in the database to be shown on the top of each page in my report. But in the report designer I get an error message if I try to drop a table in the header, and if I try to assign the value of a textbox in the header to e.g. "First(Fields!sometable.Value)", I get a runtime-error in the preview that says "... Fields cannot be used in page headers or footers".

    How can I do this?

    Regards, Tomsi

    Hi Tomsi,

    you can not place a databound field in the page header directly. Instead, you can place it in the body of the report and make it hidden.

    you can refer to this hidden field content using the similar syntax

    =ReportItems!txt_1.Value

    and display in a text box placed in the header.

    Rgds,

    Ramesh

    |||

    Nice workaround. Thanks.

    But why doesn't Reporting Services support this feature / when will it come? Workarounds like this will in the long run make the reports complex and messy. I'm converting reports from Crystal Reports, and my customer will obviously dislike this "missing" feature in RS.

    The ideal solution would be have a databound table in the header...

    Tomsi

    |||I tried this on some of the reports we have been creating and it works great on the first page but in the rest of the report the cells in the header are unable to reference the cells in the body. We are using 2005.|||

    Another option is to add a (hidden) report parameter at the beginning of your list of report parameters with a query-based default value (the field you want to show in the report header). If your query returns multiple rows, you will need to perform aggregations (e.g. Max(...)) directly in the query so that the first row contains the value you want to use for the parameter value.
    Then, in the report header reference the parameter value.

    -- Robert

    |||

    I'm experiencing the same issue, were you able to resolve the problem? It works fine on page 1, but not on subsequent pages.

    Alternatively, I was able to use the Parameters!parameter.value consistently in the header, but when I used Parameters!parameter.label, the value would disappear from the header when I changed any parameter that affected a report filter without requerying.

    |||

    The secret of this is, to embed the data in a table header. Have the table header repeat on every page, and refer to the table header cell in the text field of the page header.

    unfortuantely the only way I've been able hide the data, in the table header, and not be noticeable, is take make the font really small, and make the text, and row black. Hope this helps.

    M

    |||

    Another way to do this is to have the Data you want displayed in the header to be retrieved into Report paramaters.

    Then the parameters can be put in the Page Header.

    Set up a Paramater for each piece of Data you require and retrieve into the Paramaters setting the default values with the values you want displayed.

    It works fine. It would be much better if we could ust put Data bound fields into the Page Header.

    Dave

    |||

    I created a report (rs2005) with a hidden header row in the table that repeats on each page. When I view the report it looks fine, but when I export to a PDF the ReportItem data is missing from the header.

    Header before exporting to PDF:

    Title: This Should be Easier Date: 5/19/06

    Header after exporting to PDF:

    Title: Date:

    Is there any way to fix this?

    |||

    This could quite possibly be the biggest pain in Reporting Services, compared to other reporting tools. It is quite probable that anyone doing reports is doing so in a corporate environment where key data values must be displayed in the header. When report details relating to these key data values span more than one page, the RS engine should be able to handle this and continue to display the data associated with these values in the header. In addition, it should be able to handle changes in this data and apply appropriate page breaks.

    I have tried all these so called "work arounds" and they only work about 80% of the time. I am slowly, (or quickly, and can't admit it) coming to the conclusion that RS is not yet ready for Prime-Time corporate reporting. I agree with the previous post that these only make development in RS much more difficult and hoaky work-arounds make for difficult to maintain and basically not very functional reports.

    I have some complicated reports that use subreports, datalists, and intrictate formating of textboxes and images which need to span multiple pages and print nicely in PDF. Unfortunately, the reference to a textbox or reference to hidden row in a table just does not always work.

    IS THERE ANYONE out there that has found a simple, consistant and non-cumbersome way of doing this.

    AND for Microsoft RS development team...when are you going to provide an actual solution to this issue? It was a problem in RS2000 and continues in RS2005.

    |||You hit the nail right on the head there buddy. This task is so basic it seems ridiculous to have to resort to these tricks. I hope they get this fixed cause it's ugly.

    Frank
    |||

    I have a few clients who love SRS but almost dropped it because of this.

    We have found ways around it by using a table and putting a subreports into table headers so we could control if they displayed on first page only or all pages or not at all. Or for simpler solutions by using parameters to store the data that is required in the header.

    Either way it's a huge pain in the ^$% for what should be a simple task.

    I would also like to plead to the PM of this project to fix this in the next release or a patch it's a necessary feature if you plan to compete with other reporting tools.

    Dave

    |||

    I tried putting the value into a parameter field, but we are setting the datasource of the report at runtime. It works fine in the development environment, but when I deploy the app (even locally) I get this error:

  • The 'prmFOFCode' parameter is missing a value|||

    I used Oracle Reports for years and must admit, SSRS is a pretty disappointing enterprise reporting tool. No data fields in headers, no multi axis charts ... and the list goes on. Nice designer and clicky windows but presenting information is just a pain in the neck. Hope the SSRS team will get their act together and provide some basic corporate features.

    |||i agree with that, microsoft need to improve its reporting services by keeping corporate business in mind
  •