Results 1 to 8 of 8
  1. #1
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11

    Adding a chart to a report

    Is there any way to add a chart (PIE) to a report and have it reference the Group Header as a criteria?

    I attached a file showing a portion of the data. In actuality I have 155 rows.

    I need each ID to create its own chart, and I am going to add that as a sub report to a main report.



    Any help, or am I doomed to create 155 Tabs in excel?

    Thank you.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Should be able to. I have charts that refer to ID in report header as criteria. However, your data is not normalized and will not graph properly. I did a test with your data. Had to do these steps.

    1. Normalize data so that it is one series. This required a UNION query. There is no designer or wizard for UNION, have to type (or copy/paste) in the SQL View window of query designer.
    SELECT PWR_ID, "Type1" As Type, [Type 1] As Data FROM Table1
    UNION SELECT PWR_ID, "Type2", [Type 2] FROM Table1
    UNION SELECT PWR_ID, "Type3", [Type 3] FROM Table1;

    2. RecordSource for the report is Table1.

    3. RecordSource for the pie chart is based on the UNION.
    SELECT Type, [Data] FROM [Query1];

    4. Master/Child link properties set to the PWR_ID field.

    5. Chart displays properly only in PrintPreview.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11
    I just can not get the chart to populate. It does ok in the preview before I finish the wizard, but then, it just goes blank.

    Any ideas?

  4. #4
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11
    Never mind. Once I put the ID in the detail, it worked. Thanks.

  5. #5
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11
    Ok now I need to add Data Labels (Type 1- %, Type 2 - %, Type 3 -%) and format the Data to be a Percent.

    Sorry, new to charts.

  6. #6
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11
    Ok i corrected the data formatting by making code:

    SELECT ID, "Type1" As Type, format ([Type 1], "###%") As Data FROM Table1
    UNION SELECT ID, "Type2", format ([Type 2], "###%") FROM Table1
    UNION SELECT ID, "Type3", format([Type 3], "###%") FROM Table1;

    Any idea how to add names (Type1, Type2, Type3) to the Labels right now it shows "SUMOFDATA" and the percent?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    The data labels would be the data values. The Type values would be in a Legend.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Bigmix is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    11
    I ended up added text controls and doing the data labels that way --- easier to format.

    Thank you for your help.

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

Similar Threads

  1. MS Access GANTT Chart report
    By GaryElwood in forum Reports
    Replies: 8
    Last Post: 04-03-2012, 11:55 AM
  2. Line chart in access report
    By drp in forum Reports
    Replies: 2
    Last Post: 11-29-2011, 09:37 AM
  3. generate a chart report
    By smahdih in forum Reports
    Replies: 4
    Last Post: 11-28-2011, 02:39 PM
  4. Chart report leading zeros
    By mulefeathers in forum Reports
    Replies: 9
    Last Post: 06-02-2010, 08:49 AM
  5. Pie Chart Design for Report
    By maggioant in forum Reports
    Replies: 0
    Last Post: 10-13-2009, 03:06 PM

Tags for this Thread

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