SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

JadeV
Yak Posting Veteran

Canada
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
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
Flowing Fount of Yak Knowledge

2143 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: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page

JadeV
Yak Posting Veteran

Canada
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

JadeV
Yak Posting Veteran

Canada
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  
 New 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.05 seconds. Powered By: Snitz Forums 2000