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

Report Parameters in Report Header

8 Answers 431 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Hurse
Top achievements
Rank 1
Michael Hurse asked on 28 Jun 2010, 01:36 AM
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

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 28 Jun 2010, 09:30 AM
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
NPL IT
Top achievements
Rank 1
commented on 03 Oct 2023, 09:09 PM

I believe this is incorrect.  I can display report parameters within a field or table in the report body.  This does not work for me the page header.  
Todor
Telerik team
commented on 05 Oct 2023, 11:59 AM

Hi Drew,

The Report Parameters may be used anywhere in the Report, including Page sections.

Can you specify the Expression that is not working in the Page Header?

You may send us a sample report demonstrating the problem for local investigation in a support ticket as well.

0
Michael Hurse
Top achievements
Rank 1
answered on 28 Jun 2010, 09:39 AM
Thanks Steve - that is fantastic!

kind regards

Michael
0
Satish
Top achievements
Rank 1
answered on 28 Aug 2012, 11:25 AM
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
0
Steve
Telerik team
answered on 31 Aug 2012, 04:58 AM
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 >

0
Satish
Top achievements
Rank 1
answered on 31 Aug 2012, 05:28 AM
HI Steve,
                Thanks for your reply now its working fine.



0
Satish
Top achievements
Rank 1
answered on 31 Aug 2012, 07:51 AM
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
0
Steve
Telerik team
answered on 03 Sep 2012, 02:48 PM
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 >

0
Andrew Angell
Top achievements
Rank 2
answered on 16 Mar 2016, 02:18 PM

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.

 

Tags
General Discussions
Asked by
Michael Hurse
Top achievements
Rank 1
Answers by
Steve
Telerik team
Michael Hurse
Top achievements
Rank 1
Satish
Top achievements
Rank 1
Andrew Angell
Top achievements
Rank 2
Share this question
or