• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

3. Reports > 3.6. Create a Simple Bar Graph on a Report

3.6. Create a Simple Bar Graph on a Report

Problem

You need to create a simple bar graph on a report. Microsoft Graph or the Office Web Components would probably work, but you’re hoping for a simpler native Access solution. You need a bar for each row showing the relative score for each student. Can’t you do this with the standard Access controls?

Solution

You can place a rectangle control in the detail section of your report and set its width during the Format event that occurs as Access lays out each row of data. This solution shows how you can create a simple bar graph, setting the width of the rectangle control to be based on a numeric value in your data.

Open and run the report rptGraph in 03-06.MDB (see Figure 3-12). This report shows a list of students and their scores, along with a bar whose width represents the value of the score.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint