Advertisement

02.29.2008 at 11:57AM PST, ID: 23204865
[x]
Attachment Details

URGENT!! customize record selection for report

Asked by snowdog_2112 in Data Mining, Crystal Reports Software

I have a working SQL statement I can run against my database.  Now I want to use that query to print the report.  HOW do I use the SQL as-is in the report to select the records?  I can "Show SQL query", but it doesn't let me MODIFY that query.

Here is the query (the elipses just mean that it continues for each period of the year - I have custom date ranges for each period so I can't just use the month functions builtin):

select
sum(case when bill_date
between cast('2008-01-01-00.00.00.0000' as timestamp)
and cast('2008-01-27-00.00.00.0000' as timestamp)
then total_charges else 0 end) as period_1,
sum(case when bill_date
between cast('2008-01-27-00.00.00.0000' as timestamp)
and cast('2008-02-23-00.00.00.0000' as timestamp)
then total_charges else 0 end) as period_2
            .
            .
            .
from tlorder
Start Free Trial
[+][-]02.29.2008 at 06:53PM PST, ID: 21019641

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Data Mining, Crystal Reports Software
Sign Up Now!
Solution Provided By: James0628
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.01.2008 at 01:05AM PST, ID: 21020793

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.02.2008 at 09:55AM PST, ID: 21026809

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906