Results 1 to 7 of 7
  1. #1
    Join Date
    May 2008
    Posts
    14

    Unanswered: Report graph not in abc order/reverse abc/by y-value?

    Hi out there,

    I've tried looking all over for a solution to this problem and can't find anything... is there anyone who can help me?

    I've got a report bar graph showing the number of participants in a survey (y-axis from 0-20), and the timing of lake ice melting (x-axis columns with labels "early", "average" and "late").

    The program automatically puts the x-axis labels in alphabetical order. But I need the x-axis ordered in that exact order: early, average, late. Not in alphabetical order. Not in reverse alphabetical. And not according to their corresponding values on the y-axis. This order just makes sense qualitatively in relation to their context in the report (which for clarity's sake is observed climate changes).

    Is there any way to do this??

    Thank you!

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Add an ORDER BY clause to the reports recordsource?
    George
    Home | Blog

  3. #3
    Join Date
    May 2008
    Posts
    14
    How would you go about doing that? What would you type? Do you have an example? Sorry, it's just that I'm really new to this and VB language is really confusing to me...

    Thank you!

  4. #4
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    You may need to create a seperate table for the order.
    OrderNo - Timing
    1 early
    2 average
    3 late

    Add the OrderNo field to your query and sort by it.

  5. #5
    Join Date
    May 2008
    Posts
    14
    Thanks for the instructions!

    So I went about making a separate table with only the two fields "Order Number" (1,2,3) and "Timing" (Early,Average,Late). Then I added the table to my graph query and added the "Order Number" field and sorted by it.

    So now my graph query has three fields: Year (first sort ascending), Order Number (second sort ascending), and Timing (Early, Average, Late). The Order Number sort works in the query! Finally I have it sorted in the order of "Early-Average-Late" for each year. Thank you for that!

    However, when I make the graph with the Graph Wizard in my Report (Timing on x-axis, Year in the legend represented by different coloured bars, Data on the y-axis left blank so the program gives me automatic counts), it still does not give me the correct order...

    How do I get the graph to reflect the same order as the query?

  6. #6
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Open your report in design view. Right click on the graph and choose properties. Click the build button (...) next to Row Source. Add the Order field , uncheck 'Show', and sort by it.

    If your comfortable with SQL, you can right click and 'Zoom' the Row Source and tweek the SQL there.

  7. #7
    Join Date
    May 2008
    Posts
    14
    Yaaaaaaaaayyyyyy! It worked!

    Thank you so much!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •