Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    76

    Unanswered: Chart wont display data...

    Alrighty... here is my situation.

    I have a report named 'Graph - Lease Assignment' with a chart inside of it.
    The rowsource for the report is:
    Code:
    SELECT DISTINCT [IR - Number of Good files by employee].Employee
    FROM [IR - Number of files employee has completed] INNER JOIN [IR - Number of Good files by employee] ON ([IR - Number of files employee has completed].Date = [IR - Number of Good files by employee].Date) AND ([IR - Number of files employee has completed].Employee = [IR - Number of Good files by employee].Employee)
    GROUP BY [IR - Number of Good files by employee].Employee;
    This simply selects the employee name for the report.

    The chart's rowsource looks like this:
    Code:
    SELECT [IR - Number of files employee has completed].Date, [IR - Number of Good files by employee].Employee, ([GoodBad])/([CountOfEmployee]) AS [Error Rate], GroupErrorRate.[Error Rate] AS GroupErrorRate
    FROM GroupErrorRate INNER JOIN ([IR - Number of files employee has completed] INNER JOIN [IR - Number of Good files by employee] ON ([IR - Number of files employee has completed].Date = [IR - Number of Good files by employee].Date) AND ([IR - Number of files employee has completed].Employee = [IR - Number of Good files by employee].Employee)) ON (GroupErrorRate.Date = [IR - Number of Good files by employee].Date) AND (GroupErrorRate.Date = [IR - Number of files employee has completed].Date)
    GROUP BY [IR - Number of files employee has completed].Date, [IR - Number of Good files by employee].Employee, ([GoodBad])/([CountOfEmployee]), GroupErrorRate.[Error Rate]
    HAVING ((([IR - Number of files employee has completed].Date) Between [Forms]![Menu]![txtLA_PRfrom] And [Forms]![Menu]![txtLA_PRto]));
    You can see it in design view at the bottom of this post. You can also see the result of what is generated when the query is run.

    Now, I have a form with a button that contains this code:
    Code:
        strDocName = "Graph - Lease Assignment"
        Set First = Me!lstLA_PR
    
        If First.MultiSelect > 0 Then
        If First.ItemsSelected.Count > 0 Then
        For Each varItem In First.ItemsSelected
        strOut = strOut & "," & Chr(34) & First.ItemData(varItem) & Chr(34)
        Next varItem
        strOut = Mid(strOut, 2)
        
        strOut = "In(" & strOut & ")"
        
        
        Else
        MsgBox "Please make a selection!"
        Exit Sub
        End If
        End If
        strWhere = "[Employee]" & strOut
        
        
        DoCmd.OpenReport strDocName, acViewPreview, , strWhere
    This feeds the employees selected from a list box to the 'Graph - Lease Assignment' report.

    Problem is, nothing gets displayed in the chart when I press the button!
    If I run the report by just double clicking on it, it will work and show information for the last person filtered, but why wouldn't it work when I press the button?

    If anyone needs the database I will be happy to send it so you may hack away.
    Attached Thumbnails Attached Thumbnails 1.jpg  
    Last edited by Sucoyant; 12-23-03 at 18:54.

  2. #2
    Join Date
    Jun 2003
    Posts
    76
    Query reuslts
    Attached Thumbnails Attached Thumbnails 2.jpg  

Posting Permissions

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