Print Page | Close Window

Command Object Mystery

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3472
Printed Date: 26 May 2024 at 6:33am


Topic: Command Object Mystery
Posted By: sirlansa
Subject: Command Object Mystery
Date Posted: 18 Jun 2008 at 6:28am
I am trying to build a command object and finding that it returns NO records. In the process of troubleshooting I used the following procedure:
1) Reference the table CMSCallHistory in Database Expert. It's the only table.
2) Put a date range in Record Selection to filter on SEGSTOP and run the report to verify it selects records. It does.
3) Grab what CR generated in the 'Show SQL Query'
4) Set Datasource Location to replace the reference to the table CMSCallHistory with a command object containing exactly what I grabbed in step 3 [when I used the table by itself] as follows:

SELECT "CMSCallHistory"."SEGSTOP", "CMSCallHistory"."DISPSPLIT", "CMSCallHistory"."SPLIT1", "CMSCallHistory"."SPLIT2", "CMSCallHistory"."SPLIT3", "CMSCallHistory"."CALL_DISP", "CMSCallHistory"."DISPVDN", "CMSCallHistory"."FIRSTVDN", "CMSCallHistory"."ANSLOGIN", "CMSCallHistory"."DIALED_NUM", "CMSCallHistory"."CALLING_PTY", "CMSCallHistory"."CALLID", "CMSCallHistory"."DISPSKLEVEL", "CMSCallHistory"."SEGMENT", "CMSCallHistory"."ORIGLOGIN"
FROM   "CTI"."dbo"."CMSCallHistory" "CMSCallHistory"

5) Run the report again. It produces no error messages but NO records.

Has anyone seen this or have any ideas to debug?

-------------
Sir Lansa



Replies:
Posted By: sirlansa
Date Posted: 18 Jun 2008 at 8:15am
Additional Information...

If I move the Record Selection filter into the Command Object, it works!
as in: WHERE SegStop >= {ts '2008-05-18 12:00:00'} and SegStop < {ts '2008-05-18 13:00:00'}.

Replacing these timestamps with ?START and ?END parameters DOESN'T work however! (produces no records)
There's still a mystery here.

-------------
Sir Lansa



Print Page | Close Window