Report Parameters in Report Header

9 posts, 0 answers
  1. Michael Hurse
    Michael Hurse avatar
    19 posts
    Member since:
    Jun 2008

    Posted 27 Jun 2010 Link to this post

    Hi

    I have seem this thread from early 2009:

    http://www.telerik.com/community/forums/reporting/telerik-reporting/print-parameters-on-report.aspx 

    It indicates that it is not possible to trap the parameters and show them in a report at runtime. To relate this to my situation, I have a report which is being used as the basis of billing for services. Billing is conducted for different date ranges so I have start and end date parameters in my report. Finance have asked me to include these dates in the report so clients can see the billing period. Unless I have misinterpreted the response in the attached thread and if nothing has changed in the interim, am I right in saying there is no way I can capture these two parameters and include them in my report?

    thx

    Michael
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 28 Jun 2010 Link to this post

    Hi Michael,

    As outlined in the Using Report Parameters in Expressions help article, Report Parameters can be used in expressions that you display in a report directly or can also be used with other elements in a more complex expression. So the answer to your question is yes, you can display the selected parameter values in your report by using the Report Parameters node in the Expression Editor that lists the available parameters i.e. the following expression in TextBox item: = Parameters.MyReportParam.Value.

    Sincerely yours,
    Steve
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Michael Hurse
    Michael Hurse avatar
    19 posts
    Member since:
    Jun 2008

    Posted 28 Jun 2010 Link to this post

    Thanks Steve - that is fantastic!

    kind regards

    Michael
  5. Satish
    Satish avatar
    11 posts
    Member since:
    Jul 2012

    Posted 28 Aug 2012 Link to this post

    HI,

                I want to display report header along with filtered date range.I tried but i didn't find any solution.

    for example say report header is "skill" and filtered date range is "21-jul-2011 to 21-jul-2012",then the header should display like this
        "skill:21-jul2011 - 21-jul-2012" .


    with regards,
    sateesh
  6. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 30 Aug 2012 Link to this post

    Hello sateesh,

    Then you need a TextBox item in the report header with the following Expression:

    = "skill:" + Parameters.StartDate.Value + "-" + Parameters.EndDate.Value 

    All the best,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  7. Satish
    Satish avatar
    11 posts
    Member since:
    Jul 2012

    Posted 31 Aug 2012 Link to this post

    HI Steve,
                    Thanks for your reply now its working fine.



  8. Satish
    Satish avatar
    11 posts
    Member since:
    Jul 2012

    Posted 31 Aug 2012 Link to this post

    HI

             I want to display report header along with filtered date range.I tried but i didn't find any solution.

    for example say report header is "skill" and filtered date range is "21-jul-2011 to 21-jul-2012",then the header should display like this
        "skill: 2011/20-2012/20" . That "20" indicates week of the year. Is this achiveable
  9. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Sep 2012 Link to this post

    Hello Satish,

    You can create an User Function that returns the week of the year by using the GetWeekOfYear Method. You would use the DateTime report parameter value as first argument of this method.

    Regards,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  10. Andrew Angell
    Andrew Angell avatar
    5 posts
    Member since:
    Jun 2012

    Posted 16 Mar in reply to Steve Link to this post

    Old thread but thought I'd post anyway since a search did not show this.

    We use this on our reports.

    =Format('{0}:', Parameters.purchaseOrderStatus.Text)+Format('{0}', Parameters.purchaseOrderStatus.Label)

    Text is the property you enter when creating the parameter and appears at the top of the report viewer.
    Label is the readable value (for instance a dropdown item), rather than the numeric representation of such.

     

Back to Top
DevCraft banner