Mark Tabor

Mark Tabor

  • 569
  • 1.9k
  • 430.8k

Crystal Reporting Showing Wrong Values and SQL server Shows

May 28 2016 3:30 PM
I have to create four charts in Crystal report and i am getting the values of the chart from one table for that purposes i am using crystal reports and i am using the command object of the crystal reports and creating four command objects for each query my three queries are below 
SELECT SUM(DI.TFA+DI.TFM+DI.TFW+DI.TFB+DI.TFG) AS TARGET ,SUM(DI.TFAAnser+DI.TFBAnswer+DI.TFWAnswer+DI.TFMAnswer+DI.TFGAnswer)AS ACHIEVED,Q.Quarter_Name from DynamicIndicatorsTargetsForPu as DI
INNER JOIN Quarter AS Q ON Q.Quarter_ID=DI.Quarter
group by Q.Quarter_Name
SELECT SUM(DI.TFA+DI.TFM+DI.TFW+DI.TFB+DI.TFG) AS TARGET ,D.DistrictName ,SUM(DI.TFAAnser+DI.TFBAnswer+DI.TFWAnswer+DI.TFMAnswer+DI.TFGAnswer)AS ACHIEVED from DynamicIndicatorsTargetsForPu as DI
INNER JOIN Districts D ON D.DistrictId=DI.District
group by DistrictName
SELECT SUM(DI.TFA+DI.TFM+DI.TFW+DI.TFB+DI.TFG) AS TARGET ,P.Po_Number ,SUM(DI.TFAAnser+DI.TFBAnswer+DI.TFWAnswer+DI.TFMAnswer+DI.TFGAnswer)AS ACHIEVED from DynamicIndicatorsTargetsForPu as DI
INNER JOIN PO AS P ON PO.Po_ID=DI.Po
group by P.Po_Number
 
When I executes them in sql they gives correct answer but when i give these queries to each command object in Crystal reports and i show the Data Values for the chart option they are showing wrong values what would be the cause ?? 
 

Answers (1)