Dynamic Charts in Reports

Zempten

Board Regular
Joined
Apr 21, 2014
Messages
55
Hello

I've been trying to put charts in my reports for awhile now but without much success. I have a query that pulls from the main table the amount of time it took to load a truck based on a range of dates. Once I have the query run, I use that query to build a chart in my report. The problem occurs when I try to change to a different range of dates but my chart only shows the last date range.

As an example:
Run my query with dates 8/1 to 8/15
Place chart into report
Run my query with dates 8/16 to 8/30
Chart still only shows dates 8/1 to 8/15

How do I make my chart data change with how I change my date range? I was able to use a pivot chart that would change dynamically to how my query changes (with the changing date range), but I cannot seem to put a pivot chart into a report. Is there anyway to get my chart to update with how I change my query dates?
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

ranman256

Well-known Member
Joined
Jun 17, 2014
Messages
1,913
Your query should be looking at the form to get the dates say...txtDateStart, and txtDateEnd
The query should be
select * from table where [date] between forms!frmRpt!txtDateStart and forms!frmRpt!txtDateEnd

The report will use this query and it WILL change as the dates change.
If not, its possible your chart is not mapped to the dates in the query.
 

Watch MrExcel Video

Forum statistics

Threads
1,113,936
Messages
5,545,105
Members
410,656
Latest member
Hydraulics
Top