Results 1 to 4 of 4
  1. #1
    combine21 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    31

    charts in reports

    I have a report which contains a pie chart. I want to be able to use a form with a dropdown to select a certain year, in which will pull the data into the chart for that specific year. Is there some type of code in the chart properties that will tie it to the query which is tied to the form. I know how to tie reports to the form dropdown but not charts within a report. Thanks for any help.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    what you might want to do (if not already) is simply bind the chart to the query through the report wizard. if you've already done that, just change the query source if you need to.

    the great thing about graphs and charts is that they automatically produce crosstab queries. e.g. - they can group a dataset on two fields, and read it like a simple SELECT query.

    If you are simply using years, there's a bunch of ways. is your chart using the datefield series (x-axis) with the FORMAT() function? The first thing I would do is put a criteria line in the query (if the chart is based on the query) to grab the year from the combo:
    Code:
    WHERE year([DateField]) = forms!formName!ComboName
    or...if the combo has actual dates in it, maybe:
    Code:
    WHERE year([DateField]) = year(forms!formName!ComboName)
    Again, it really depends heavily on what format the actual date is in. Charts are smart enough to group on the date as long as it is in a format that is recognized by Access. That includes dates that have been manually formatted with the FORMAT() function.

  3. #3
    combine21 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    31
    Well I got the correct chart to pop up based on the year, but now I have another problem. I need my charts to plot a field in which some records are blank. These records are still vital to percentages and other ascpects. How can I tell it to plot my blank records as well?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by combine21 View Post
    Well I got the correct chart to pop up based on the year, but now I have another problem. I need my charts to plot a field in which some records are blank. These records are still vital to percentages and other ascpects. How can I tell it to plot my blank records as well?
    you have to put 0s in for those records. To my knowledge, MS graph will not plot points that are NULL. MS Graph has always left something to be desired. It's really one of Microsoft's worst programs to deal with. IMO

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pareto Charts
    By arthura in forum Access
    Replies: 1
    Last Post: 08-11-2011, 08:33 AM
  2. Pivot Charts
    By Vikki in forum Access
    Replies: 3
    Last Post: 02-08-2010, 11:14 AM
  3. Multiple Charts Instead of One
    By Mike Borozdin in forum Reports
    Replies: 0
    Last Post: 02-28-2009, 07:15 AM
  4. Charts in Reports
    By arthura in forum Reports
    Replies: 0
    Last Post: 01-09-2009, 07:16 AM
  5. Pivot Charts
    By Ruby in forum Access
    Replies: 0
    Last Post: 11-16-2007, 05:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums