Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Report Parameters in Graph

Status
Not open for further replies.

jmeadows7

IS-IT--Management
Jun 13, 2001
148
US
I have a pie graph that displays sales by customer segment based upon a query. Within that query, the user is prompted with a parameter for order date on the criteria statement:
between [Enter Beg Ord Dt] And [Enter End Ord Dt]

I have the graph working great etc. I just want to be able to display the data parameters entered by the user in the report header. The detail section of the report contains the pie graph.

I may just have to put the report request on a window with input dates and allow the user to enter the dates on the window and grab them from there - as opposed to the query. I thought I'd ask here first.

Oh yeah - I can make them appear by basing the report on a query that gets ONLY the dates from the original query - but the user is prompted twice and the data would actually be retrieved twice. I don't want a double prompt - too ugly.


Thanks in advance!
 
your idea is the best: create a form if you don't already have one. put on two text boxes (txtDateFrom and txtDateTo) and a button. a user can enter the dates in there, and hit the button.

in the button's OnClick code, you can follow the wizard to have it open your report that you already have. change these things in your report:

1) put date into the report title: in the report heading put for example "Data Reported in range: " & forms!Main!txtDateFrom & " - " & Forms!Main!txtDateTo

this will come out as

Data Reported in range 6/1/03-7/15/03

or whatever. you can alter as needed.

2) in your chart, your criteria will now be instead of the [blah] promts, forms!main!txtDateFrom and forms!main!txtDateTo (substitute your form name for 'main')

then in the query that is the recordsource for the chart: go into the query's design mode. right-click in the grey area above the query grid and choose PARAMETERS from the pop-up menu. put in Forms!Main!txtDateFrom and Forms!Main!txtDateTo and their data types (date/time). you have to do this or the chart won't show anything.

ok so try that out and see how it goes.

g
 
Yep - that's what I thought. Just wanted to make sure I wasn't simple. I've seen some of your other posts, so if between the two of us, we don't know an easy way, there may not be one!

Have a good weekend and thanks for a quick response.

Jimmy
 
Yep - that's what I thought. Just wanted to make sure I wasn't missing something simple. I've seen some of your other posts, so if between the two of us, we don't know an easy way, there may not be one!

Have a good weekend and thanks for a quick response.

Jimmy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top