Results 1 to 6 of 6
  1. #1
    MOHRONAL is offline Novice
    Windows 8 Access 2016
    Join Date
    Nov 2015
    Posts
    3

    Question how i can make a dynamic chart report?

    Hello everyone,,

    I want create charting report by some data i selected for this mission, but the problem is this data i want do it by user not by me, i mean dynamic chart.

    So, i selected 3 fields from table (Date, Meters_Number, Value) and put it in query, then i used wizard for create graph (Line chart) to be in this shape in crosstab query (created automatically by wizard as row source for chart):

    • Date - Column Heading
    • Meter_Number - Row Heading
    • Value - Value


    Now, i want user control for what specific date to show the chart (Note: date was in mm/yyyy), and what the range of values to show this chart.
    More Explain: I Want from user to select a date for chart (
    like: 05/2015) and choose range of values (like: >= 400 <= 1000) from Specific Form for that.

    And when user choose that Options from (Form) and press open button, show the chart contains in y axis the values and in x axis the meters number contain a selected ranged value and the line of chart Illustrates the value for each meter_number in the selected date.

    Thanks, and if i missed any info please tell me to make the problem more clearly..


    Finally, Sorry for My English if i made any mistake

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I think that's what Pivot table/chart feature was for. However, MS removed this from Access 2013.

    The alternatives are:

    1. Dynamic parameterized query as the chart's RowSource - dynamic parameters in CROSSTAB are tricky, review: http://allenbrowne.com/ser-67.html#Param

    2. VBA to construct SQL statement and programmatically set the chart's RowSource property - this is simple with a form but a little more difficult with a report

    Date should be in yyyy/mm to correctly sort by year then month - if multiple years are displayed.
    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
    MOHRONAL is offline Novice
    Windows 8 Access 2016
    Join Date
    Nov 2015
    Posts
    3
    Quote Originally Posted by June7 View Post
    I think that's what Pivot table/chart feature was for. However, MS removed this from Access 2013.

    The alternatives are:

    1. Dynamic parameterized query as the chart's RowSource - dynamic parameters in CROSSTAB are tricky, review: http://allenbrowne.com/ser-67.html#Param

    2. VBA to construct SQL statement and programmatically set the chart's RowSource property - this is simple with a form but a little more difficult with a report

    Date should be in yyyy/mm to correctly sort by year then month - if multiple years are displayed.
    Thanks for ur help and ur advice

    I tried the first solution and it make perfect result as i need.

    Now there are problem for chart legend, i want it show in this format (yyyy/mm -
    As u perfect advice), the currently legend was mmm-yy (Oct-15) so how i can change it? and how to change fonts and weight of lines...etc in chart by VBA?, because the Microsoft Graph was very bad programming in office 2016! (Stopped Working Errors) or Maybe the problem in my PC!.

    Thx Again Mr.June7

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Your data must be yyyy/mm to show this way in the legend.

    I have used VBA to set chart titles and scales. Review https://www.accessforums.net/reports...xis-38491.html

    Why programmatically change font and line weight?
    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.

  5. #5
    MOHRONAL is offline Novice
    Windows 8 Access 2016
    Join Date
    Nov 2015
    Posts
    3
    Quote Originally Posted by June7 View Post
    Your data must be yyyy/mm to show this way in the legend.

    I have used VBA to set chart titles and scales. Review https://www.accessforums.net/reports...xis-38491.html

    Why programmatically change font and line weight?
    Thanks for Reply

    I reviewed your post and changed some things for my graph, but the problem that u referenced it by your question, and simply answer is my Microsoft Graph was crashed and crashed for every step and for every choosing in font or color or weight... etc, so i think for alternative solution by Programming it with VBA code.

    So can you reference me about that?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I've never done code for that. What I have was gleaned from web search. You will have to do the same.

    You say the chart fails when you manually set font and line weight in the chart properties? That should not happen and never has for me.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-19-2015, 03:29 PM
  2. Replies: 8
    Last Post: 09-24-2014, 05:36 PM
  3. Replies: 7
    Last Post: 12-05-2012, 10:10 AM
  4. Dynamic Chart Title in Report
    By Kirsti in forum Reports
    Replies: 10
    Last Post: 03-21-2012, 01:56 PM
  5. make a chart from the table
    By barkarlo in forum Access
    Replies: 0
    Last Post: 07-29-2010, 02:22 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