| View previous topic :: View next topic |
| Author |
Message |
derekd General User

Joined: 14 Jun 2012 Posts: 7 Location: Warwick UK
|
Posted: Thu Jun 14, 2012 1:21 am Post subject: [Solved]How do I display a parameter in a report heading? |
|
|
]I have created a query to input 2 parameters using the BETWEEN function. I have created a report based on it to display rambles between X and Y miles. I want the title of the report to be "Rambles between X and Y miles" where X and Y vary.
Any help would be appreciated. I used to be able to do this in Access without using SQL. I am not familiar with SQL.
Thank you.
Last edited by derekd on Fri Jun 15, 2012 1:12 am; edited 5 times in total |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2477 Location: 3rd Rock From The Sun
|
Posted: Thu Jun 14, 2012 5:30 am Post subject: |
|
|
You indicated you created a Query, assume your BETWEEN statement on the Criterion line was ( if not exactly as below, change the code I am providing to match your prompts ):
| Code: | | BETWEEN :Enter_From_Miles AND :Enter_To_Miles |
Two alternatives, use EITHER a or b below:
- Alternative a: You will enter TWO additional columns for your Query:
- On another column, on the Field line, place:
On the Alias line, choose a column name, for example: From Miles
On another column, on the Field line place:
On the Alias line, choose a column name, for example: To Miles
Run the Query
Save the Query
Alternative b, You will enter ONE additional column for your Query
- On the field line, enter:
| Code: | | 'Rambles between ' || :Enter_From_Miles || ' and ' || :Enter_To_Miles' || ' miles' |
On the Alias line, enter: ReportTitle
Run the Query
Save the QueryExplanation: Since the Prompt names ( beginning with the colons ) are the same as you used on the Criterion line, they are only prompted for once. After running it, the content for each returned record of the Query also contains your input range, so, these values can be used in the Report or Report Title. Alternative b, creates the Report Title as you described it, using the prompts you already input.
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
derekd General User

Joined: 14 Jun 2012 Posts: 7 Location: Warwick UK
|
Posted: Thu Jun 14, 2012 7:52 am Post subject: Parameter query |
|
|
Many thanks for your help. I managed to get a Query working similar to the examples shown. I deleted a superfluous ' at the end of :Enter-To-Miles and used the following
'Rambles between ' || :Enter_From_Miles || ' and ' || :Enter_To_Miles || ' miles'
My query displays, amongst other fields, 3 extra columns with aliases From Miles, To Miles and ReportTitle. the results are as expected when I run the query.
However, I can't get the report to display the ReportTitle as displayed in the query. I can get the correct data displayed in the report but cannot get the title to display. I copy and paste the ReportTitle field into the title area. |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2477 Location: 3rd Rock From The Sun
|
Posted: Thu Jun 14, 2012 8:05 am Post subject: |
|
|
Which Report tool are you using? :
- Oracle Report Builder ( formerly named Sun Report Builder ) from the extension
- Not the above, but, using Writer as the report surrogate
Yes, you are correct, one superfluous ( extra ) single quote, sorry.
Sliderule |
|
| Back to top |
|
 |
derekd General User

Joined: 14 Jun 2012 Posts: 7 Location: Warwick UK
|
Posted: Thu Jun 14, 2012 9:03 am Post subject: Using parameters in a report title |
|
|
| Thank you. I took the hint and downloaded Oracle Report Builder. That solved my problem. I had not downloaded any report builder. i wonder if it was a bug that caused my problem. I like Oracle Report Builder. thanks for the tip! |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2477 Location: 3rd Rock From The Sun
|
Posted: Thu Jun 14, 2012 9:07 am Post subject: |
|
|
Good that you have resolved the issue.
Therefore, please, follow the instructions below, and, mark this post as [Solved] . . . so others reading / searching the forum will know to look for posts that have been 'resolved' AND no reason to post further solutions, since, it is now solved.
Sliderule
Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
derekd General User

Joined: 14 Jun 2012 Posts: 7 Location: Warwick UK
|
Posted: Thu Jun 14, 2012 10:38 am Post subject: parameter report |
|
|
| The problem was solved but I now find i get repeated crashes with Oracle Report Builder. I can eventually build a report using Create a Report in Design View. The Report Wizard has stopped loading altogether. I tried removing Oracle Report Builder and then adding it again (as an extension). I now see that at the download site lots of people have written negative reports about it. Maybe, you were not recommending it after all. Anyway my problem is solved. So, thanks again. |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2477 Location: 3rd Rock From The Sun
|
Posted: Thu Jun 14, 2012 11:07 am Post subject: |
|
|
I use the Oracle Report Builder, without any problems all the time.
Other users comments, are often from some that have elected not to read the documentation or follow instructions.
While you added [Solved] to your first post, you did NOT follow the instruction I gave explicitly at the bottom of my posts. I have asked that you add [Solved] in your first post Title, not in only in your first post. So, others doing a search, will note the posts that have been solved with the words as a part of the title.
Sliderule
Thanks to add [Solved] in your first post Title ( edit button ) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
|