cancel
Showing results for 
Search instead for 
Did you mean: 

Display Parameter on Report Header

Former Member
0 Kudos

I have a report with many filters using the select expert. One of these is a date range.

I would like to add something in the report header like.... "For Date Range "...with the actual date range I set in Select Expert to follow.

I saw somewhere that it is possible if the date field is set as a Parameter field but can not seem to find it again.

Does anybody have any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

amrsalem1983
Active Contributor
0 Kudos

i may not got you will, but if you want to put a paremeter field in the report header,

whats the problem??

go to the field explorer, expand the parameters, drag the parameters to the stage in the report header.

im sorry if i got you in wrong way.

good luck

Amr

Former Member
0 Kudos

sorry, I did not explain well.

For example.... I run a report using a date range as 1/1/2008 thru 6/30/2008. I would like to automatically show this date range in the report header. Is there a formula that would allow me to do this.

I would like the report header to display: For Date Range: 1/1/2008 thru 6/30/2008

I want this to display automatically because the date range will vary each time I run it.

Right now I have a text box and I manually change the dates each time.

Hope this clears it up for you.

amrsalem1983
Active Contributor
0 Kudos

the date range from to

do you have them as parameters, or they are fixed in the report "select expert"

i mean if you have a parameter DATE_FROM, and a parameter DATE_TO,

you can add them to the report header.

if they are not parameters.. and you have just only a field called "TRANS_DATE" or watever

you can use the MAX and MIN functions in some formula

good luck

Amr

Former Member
0 Kudos

currently I am using Select Expert to make my date range.

How do I use the min and max function?

alex_styles
Advisor
Advisor
0 Kudos

Hi Travis,

If you want to dynamically display the parameter values chosen for the report, you will want to create a formula to do this.

- Create a new formula field.

- Enter the following formula.

'For Date Range:' + ToText(Minimum({?DateRangeParameter}) + ' ' + 'Thru' + ' ' + ToText(Maximum({?DateRangeParameter})

- Place this formula into the report header and you will get the display of the dates in the format you are looking for.

This formula will get the start date and tconvert it into text and then also the end date and convert that to text and concatenate these date strings with the other text data for display.

former_member260594
Active Contributor
0 Kudos

Try something similar to this;

"For Date Range: " + totext(minimum({?daterange})) + ' thru ' + totext(maximum({?daterange}))

Former Member
0 Kudos

hmm still not clear that what you are looking for. However, I usually do this way.

Create a date range parameter - then create it using Record Selection under Report.

Drag and drop the parameters from the file explorer to the report footer. Once done, run the report and it will show you the date range. Don't have to put it manually each time on text field.

If however, you are looking for a code wehre it puts the date range by itself and you don't want the end user to put the date range then try this.


({date} in MonthToDate and 
 {Code} >= {?startcode} and
 {Code} <= {?endcode});

Please note the Code and Date are the database fields.

If you want to show daily date I mean Current Date then use this

in report record selection


{Date} in {@StartDate} to {@EndDate} and
 {Code} >= {?startcode} and
 {Code} <= {?endcode}

and create two seprate formulas with each containing

Currentdate();

So the two formula would be Start date (CurrentDate()) and End Date (Currentdate() ).

Start date and End date are two formulas.

Then drag those formulas and put them into the report.

Hope this helps

Let us know if this is not what you looking for.

Regards

Jehanzeb

Former Member
0 Kudos

Travis,

It's sounding like you are filtering your data on the Select Expert manually, correct?

ie: on your select expert, you have {table.datefield} >= '1/1/08' and {table.datefield} <= '1/31/08'... and your change the dates manually.

You can create two parameters (one for starting date, one for ending date), and change the Parameter type to "Date Time" (or Date, depending on what datatype your fields really are).

You can then go back to your select expert and replace the dates in the formula with your new parameters.

ie: {table.datefield >= {?StartParameter} and {table.datefield} <= {?EndParameter}

That'll take care of you having to manually change the formula everytime you want a different date range. It'll also take care of what you want on your report header by placing the two parameters on your report header. They will reflect the values you selected.

Hope this helps.

Former Member
0 Kudos

Problem solved. Thanks Alex and Graham. Wish I could award ya both 10 points.

Former Member
0 Kudos

Is there a way to do this on parameters that are not dates? For example, if my report was selected by a city parameter and I selected Boston, Springfield, and Dallas. Is there a way to report those three cities listed in my parameters? (Currently, I can only get the range Boston-Springfield).

Answers (0)