Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Lost data when run in Crystal Report

Author  Topic 

JadeV
Yak Posting Veteran

62 Posts

Posted - 2012-09-25 : 09:38:28
I don't know what wrong it is because when I run the query, the output is 10587 rows, but when I copy this query into the Crystal Report, it lost data and the output just only 4939. I don't know why?
Did I do something wrong in JOIN?
Because when I copy to Crystal Report, I created a paramater for a field Service for AOS and Telecom, but just only have a field "AOS" apprear. The same for other field relative to Telecom didn't appear.

Please help me check out. Thanks

My query as below:

============================
select a.Service, a.Category, a.SubCategory1,
c.ParentPublicID , a.CreatedDatetime, a.ChooseContact, a.requestorDisplayName, a.TypeOfRecord as ServiceType, b.acknowledgedDateTime, b.ResolvedDateTime, b.Notes, b.ResolutionNotes

from serviceDesk a
FULL OUTER JOIN task b
ON a.ServiceDeskID = b.ParentPublicID
and a.requestorDisplayName = b.SDInitiatior
and a.TypeOfRecord = b.ParentServiceDeskType

FULL OUTER JOIN timerecord c
ON a.ServiceDeskID = c.ParentPublicID

where a.CreatedDateTime between '01-01-2011'and @Today
and a.Service in ('AOS', 'Telecom')
ORDER BY a.Service, a.Category, a.SubCategory1

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2012-09-25 : 14:43:10
why don't you have this query as a Stored Proc, and call the stored proc from Crystal Reports?








How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page

JadeV
Yak Posting Veteran

62 Posts

Posted - 2012-09-26 : 09:56:14
Because I don't have a permission to create a Proc,
Go to Top of Page

JadeV
Yak Posting Veteran

62 Posts

Posted - 2012-09-26 : 10:00:55
I found out, when I deleted a "ORDER BY", then I can create a parameter to get all field, but when I run the report, it still lost data value. :(
Go to Top of Page
   

- Advertisement -