J
Jeff
I have a database which includes a report with bar charts which works and
displays just fine but I need to combine the information in the legend for
each bar with data from two seperate fields.
Currently, the row source for one of my bar charts is as follows:
I have tried the following by adding the first 10 characters of the field
IDESC as follows:
But I get an error message which states:
The SQL of my query is:
What am I doing wrong and how can I get these two fields to be displayed for
each bar of my bar chart?
thank you.
displays just fine but I need to combine the information in the legend for
each bar with data from two seperate fields.
Currently, the row source for one of my bar charts is as follows:
SELECT TOP 10 ([Assembly Number]) AS Expr1, (Sum([Pass Quantity])/(Sum([Pass
Quantity])+Sum([Fail Quantity]))*100) AS [FPY by Operation] FROM [metrics
problem qry] GROUP BY [metrics problem qry].[Assembly Number] HAVING
(((Sum([metrics problem qry].[Pass Quantity]))>0)) ORDER BY ((Sum([Pass
Quantity])/(Sum([Pass Quantity])+Sum([Fail Quantity]))*100)), [Assembly
Number];
I have tried the following by adding the first 10 characters of the field
IDESC as follows:
SELECT TOP 10 ([Assembly Number] &"-"& Left([IDESC],10)) AS Expr1,
(Sum([Pass Quantity])/(Sum([Pass Quantity])+Sum([Fail Quantity]))*100) AS
[FPY by Operation] FROM [metrics problem qry] GROUP BY [metrics problem
qry].[Assembly Number] HAVING (((Sum([metrics problem qry].[Pass
Quantity]))>0)) ORDER BY ((Sum([Pass Quantity])/(Sum([Pass
Quantity])+Sum([Fail Quantity]))*100)), [Assembly Number];
But I get an error message which states:
You tried to execute a query that does not include the specified
expression'[metrics problem qry].[Assembly Number] & "-"&Left([IDESC],10' as
part of an aggregate function
The SQL of my query is:
SELECT [FPY Table].Date, [FPY Table].ID, [FPY Table].Operator, [FPY
Table].[Serial Number], [FPY Table].Operation, [FPY Table].[Assembly Number],
[FPY Table].[Pass Quantity], [FPY Table].LatePass, [FPY Table].[Fail
Quantity], [FPY Table].[Total Failure], [FPY Table].ProblemCode1, [FPY
Table].Rework, [FPY Table].[Part Number], [FPY Table].[Description of
Problem], [FPY Table].PassYield, [FPY Table].FailYield, [FPY Table].depos,
[FPY Table].multiprobs, [FPY Table].RejectNbr, [FPY Table].DTS, [FPY
Table].TermID, ONEBPCSF_IIM.IDESC, ([Assembly Number] & " - " &
Left([IDESC],10)) AS Expr2
FROM [FPY Table] INNER JOIN ONEBPCSF_IIM ON [FPY Table].[Assembly Number] =
ONEBPCSF_IIM.IPROD
GROUP BY [FPY Table].Date, [FPY Table].ID, [FPY Table].Operator, [FPY
Table].[Serial Number], [FPY Table].Operation, [FPY Table].[Assembly Number],
[FPY Table].[Pass Quantity], [FPY Table].LatePass, [FPY Table].[Fail
Quantity], [FPY Table].[Total Failure], [FPY Table].ProblemCode1, [FPY
Table].Rework, [FPY Table].[Part Number], [FPY Table].[Description of
Problem], [FPY Table].PassYield, [FPY Table].FailYield, [FPY Table].depos,
[FPY Table].multiprobs, [FPY Table].RejectNbr, [FPY Table].DTS, [FPY
Table].TermID, ONEBPCSF_IIM.IDESC, ([Assembly Number] & " - " &
Left([IDESC],10))
HAVING ((([FPY Table].Date) Between [forms]![print or view
reports]![StartDate] And [forms]![print or view reports]![EndDate]));
What am I doing wrong and how can I get these two fields to be displayed for
each bar of my bar chart?
thank you.