Results 1 to 2 of 2
  1. #1
    Join Date
    May 2014
    Posts
    98

    Unanswered: Doesn't spit correct when making chart in report

    I am trying to use this query. It gives me correct results as query. However when I make chart with query on a report it doesn't show correct data and eventually stops making chart

    SELECT qry.txtRC, Count(tbl.txtRC) AS CountOftxtRC
    FROM tblMain AS tbl, qryRC AS qry
    WHERE (((tbl.txtDepartment)=[Forms]![frmRC]![cboDepartment] Or [Forms]![frmRC]![cboDepartment] Is Null) AND ((tbl.txtZone)=[Forms]![frmRC]![cboZone] Or [Forms]![frmRC]![cboZone] Is Null) AND ((tbl.txtRC )=[qry].[atnRC ID]) AND ((tbl.date) Between [Forms]![frmRC]![startDate] And [Forms]![frmRC]![endDate]))
    GROUP BY qry.txtRC , tbl.txtRC
    HAVING (((Count(tbl.txtRC )) Is Not Null)) OR (((Count(tbl.txtRC )) Is Not Null))
    ORDER BY Count(tbl.txtRC ) DESC;

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    The chart object is very finicky.

    A few things to try:
    1) Change the OR to AND in the HAVING clause - charts don't like Nulls and the OR will allow them
    2) Save the SQL as a query, and set the chart recordsource to the saved query instead of the SQL statement
    3) Purposely restrict the data to a few records so you can finagle the chart formatting and setup
    4) Try setting the chart up in a form instead of a report to make sure it works (I've always had trouble with charts in reports)
    have fun!

    Todd S.
    click to email


    Independent Development Consultant
    Biz db & reports - SQL, Access, Crystal, Seradex and more
    Small, custom, unique programs - Office, VBA, .NET


    _________________________________________________
    Favorite message from Windows:
    There was an error displaying the previous error message

    Sadly, there was no error number to look up ...

Posting Permissions

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