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

12 posts, 0 answers
  1. justins
    justins avatar
    11 posts
    Member since:
    Apr 2007

    Posted 06 Apr 2007 Link to this post

    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
  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 10 Apr 2007 Link to this post

    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
  3. DevCraft banner
  4. justins
    justins avatar
    11 posts
    Member since:
    Apr 2007

    Posted 10 Apr 2007 Link to this post

    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.
  5. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 13 Apr 2007 Link to this post

    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
  6. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 24 Apr 2007 Link to this post

    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
  7. ScottR
    ScottR avatar
    44 posts
    Member since:
    Nov 2006

    Posted 26 Apr 2007 Link to this post

    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.
  8. justins
    justins avatar
    11 posts
    Member since:
    Apr 2007

    Posted 26 Apr 2007 Link to this post

    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.
  9. ScottR
    ScottR avatar
    44 posts
    Member since:
    Nov 2006

    Posted 26 Apr 2007 Link to this post

    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.

  10. Raido Valgeväli
    Raido Valgeväli avatar
    26 posts
    Member since:
    May 2008

    Posted 10 Jan 2009 Link to this post

    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
  11. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 10 Jan 2009 Link to this post

    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
  12. Qendrim
    Qendrim avatar
    1 posts
    Member since:
    Mar 2013

    Posted 07 Mar 2013 Link to this post

     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
  13. Hadib Ahmabi
    Hadib Ahmabi avatar
    181 posts
    Member since:
    Nov 2011

    Posted 11 Mar 2013 Link to this post

    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".
Back to Top
DevCraft banner