This is a migrated thread and some comments may be shown as answers.

Is it possible to add data items to report Page Header?

11 Answers 771 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
justins
Top achievements
Rank 1
justins asked on 06 Apr 2007, 04:34 PM
Hello,
I successfully can bind data elements to the detail section of my report but not to the page header.  When I try to bind:
=First(<columnName>)
in the page header and run the report, I get a 'Column <columnName> does not belong to the table' error.

However, I can drag that textbox to the details section and it works.

What am I missing here?
Thanks - Justin

11 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 10 Apr 2007, 10:44 AM
Hello justins,

You cannot use any binding expression with data fields in the PageHeader or PageFooter sections, and this restriction is by design. In PageHeader and PageFooter you're allowed to use PageNumber and PageCount, but no data field or aggregate functions - in contrast to the other sections where you can use the data fields and aggregate functions, but cannot use PageNumber and PageCount. The reason is that these two sections (and the items inside them) are processed while rendering the report page, and the other sections and their items are used to page the report.

 
All the best,
Svetoslav
the telerik team

Instantly find answers to your questions at the new telerik Support Center
0
justins
Top achievements
Rank 1
answered on 10 Apr 2007, 12:25 PM
Svetoslav,
Thank you for the explination.  However, I would hope telerik reconsiders this functionlaity in a future release version.  I can think of numerious reasons why someone would want a bound field in the page header section.

Besides the fact SQL Server Reporting Services supports it, it seems like a significant restriction.  For instance, if I had a report with multiple sections and I was required to display the current section name at the top of each page, this wouldn't be supported.  Similar to how many books have the chapter number and title at the top of every page.

This logic also holds true for the group header/footer sections which also doesn't seem to support data bound fields.

Please update me if this changes in the future.  Thank you.
0
Svetoslav
Telerik team
answered on 13 Apr 2007, 11:48 AM
Hello justins,

Thank you for your feedback. As you've seen the item binding expressions are not finalized and we will continue working on them and will have your notes in mind.

Currently in the group sections you can use only fields that take part in the grouping criteria, as well as aggregate functions that can use all available/suitable fields.


Kind regards,
Svetoslav
the telerik team

Instantly find answers to your questions at the new telerik Support Center
0
Todd Anglin
Top achievements
Rank 2
answered on 24 Apr 2007, 06:50 PM
I think your point is spot on, Justin. There are definitely reporting scenarios where a data field may be needed in the page header/footer. Section names is a great example. Reports that run per (let's say) employee are another good example (where you want the employee name in the page header). Even something simple like displaying an "as of" date pulled from your data source in the header would require that support.

I'm sure a future version of Reporting will address this issue to enable these common scenarios. I just wanted to let you know I agree with your logic.

Thanks~
Todd
0
ScottR
Top achievements
Rank 1
answered on 26 Apr 2007, 06:28 PM
To my knowledge, SSRS does NOT support data-bound fields in the page header/footer either. The workaround is to define report parameters that are filled by the data source then use the parameters in the page header/footer.

Is there any kind of similar workaround for the telerik reporting? If not, I don't even need to bother downloading the trial.
0
justins
Top achievements
Rank 1
answered on 26 Apr 2007, 07:29 PM
Scott,
SSRS 2005 does in fact support data bound items in a report's page header.  However, you have to use use the first instance of a field like:
=First(ReportItems![columnName].Value)

That workaround you mention doesn't fullfill the case where the page header may not be a parameter.  Say for instance I have report with a parametrer of PersonId but I want to display the person's full name and social security number on the page header, I'd be out of luck because that is a security risk.

I hope this gets addressed soon.
0
ScottR
Top achievements
Rank 1
answered on 26 Apr 2007, 07:53 PM
When I use the following expression: =First(Fields!BAN.Value)

I get this message:
[rsFieldInPageSectionExpression] The Value expression for the textbox ‘textbox40’ refers to a field.  Fields cannot be used in page headers or
footers.

When I use your expression: =First(ReportItems!BAN.Value)

I do not get an error message, but nothing prints. What am I missing here? I would LOVE for this to work because creating all these parameters is killing me.

As for using parameters, they are marked "internal" so that they are not visible outside the report.

0
Raido Valgeväli
Top achievements
Rank 2
answered on 10 Jan 2009, 09:15 AM
I think it's ok to post a link to one possible solution here (as this is the topic I found first while searching)
http://www.telerik.com/community/forums/reporting/telerik-reporting/page-footer-expression-problem.aspx
0
Steve
Telerik team
answered on 10 Jan 2009, 12:02 PM
Hi guys,

It is possible to add data items to page sections for quite some time now (Q2 2008 if we need to be exact). Note however that all data fields must be aggregated, even if the data source returns only one row i.e. their usage is similar to the report header/footer now.

Greetings,
Steve
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Qendrim
Top achievements
Rank 1
answered on 07 Mar 2013, 04:18 PM
 Hello, im new with telerik reporting and my question is how can i display a datafield into reportHeader section. I tried the function First(datafield) however the data repeated for each row.   Thanks
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 11 Mar 2013, 09:44 AM
If it repeats then you haven't put in the report header but in the detail section.
You can add report header section by right-clicking on the empty space in the designer and selecting "Report Header".
Tags
General Discussions
Asked by
justins
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
justins
Top achievements
Rank 1
Todd Anglin
Top achievements
Rank 2
ScottR
Top achievements
Rank 1
Raido Valgeväli
Top achievements
Rank 2
Steve
Telerik team
Qendrim
Top achievements
Rank 1
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or