Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Boolean Array is required here Post Reply Post New Topic
<< Prev Page  of 2
Author Message
abernut
Newbie
Newbie
Avatar

Joined: 25 Aug 2010
Location: United States
Online Status: Offline
Posts: 25
Quote abernut Replybullet Posted: 28 Jul 2011 at 7:48am
It seems like you have run time paramters though? Is that correct?
I don't thing so.  When I think of parameters I think of something the user must enter before the report runs.  The only thing I have is the formulas listed above.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Jul 2011 at 8:18am

So I am goint to guess that in general you are always working with the current and past year of data.

I think I would create a command to limit the sales data to the last 2 years and then ledt join that to the customer table which you can filter on.
 
so your command will be something like this
 
SELECT    cus_no, tot_sls_amt, inv_dt, orig_ord_type   
 
 FROM   oehdrhst_sql
 WHERE  (inv_dt between DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) - 1, 0) AND DATEADD(dd,-1,DATEADD(yy,0,DATEADD(yy,DATEDIFF(yy,0,getdate())+1,0))))
 AND oehdrhst_sql.orig_ord_type<>'C'
 
that should pull all your records between jan 1 of last year and dec 31 of this year
 
now add the customer table to this command on the customerid as a left outer join to select all rows from the customer table
 
then in your select statement in crystal filter the customer list to what you want using the customer table not the command (sales)
IP IP Logged
abernut
Newbie
Newbie
Avatar

Joined: 25 Aug 2010
Location: United States
Online Status: Offline
Posts: 25
Quote abernut Replybullet Posted: 29 Jul 2011 at 1:05am
Thank you for your help on this.
I will try that code out today and post back the results

Mike
IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.