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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Lost data when run in Crystal Report
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

62 Posts

Posted - 09/25/2012 :  09:38:28  Show Profile  Reply with Quote
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
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

Flowing Fount of Yak Knowledge

2167 Posts

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

How to ask:

Go to Top of Page

Yak Posting Veteran

62 Posts

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

Yak Posting Veteran

62 Posts

Posted - 09/26/2012 :  10:00:55  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000