Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Help (a "where statement", I think) Post Reply Post New Topic
Author Message
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Topic: Formula Help (a "where statement", I think)
     Posted: 29 Nov 2010 at 8:33am

Hello,

I have a table with data from multiple dates and accounts.
 
I need to isolate the activity from one date and account, and display it on the same line as other accounts. 
 
For example:
 
Account      Jan      Feb      Mar...  Total
1000            10         7         12        29
2000              5       10           8        23
3000            20       18         19        57
4000            11       11         11        33
 
In this case, account 1000 represents data that is a related to account 3000.  So, I need to be able to subtract the year to date (Jan-Mar) total of account 1000, from the monthly value of account 3000 for Mar (19-29).
 
I can't figure out how to write the formula where it uses a different account than the one on the associated line.
 
I am guessing a where statement would work, but I don't know how to do that (if it can be used at all).

Thanks,
 
Paul
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 30 Nov 2010 at 3:12am
Personally, I would use a stored procedure.  There you can manipulate the data to do whaterver you need.  CR his kind of limited in what it can do, actually anything that uses only 1 select is pretty limited.
 
All of my reports drive off of stored procs because of the versatility of what one can do with the data
 
HTH
IP IP Logged
pgiering
Newbie
Newbie


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 37
Quote pgiering Replybullet Posted: 30 Nov 2010 at 6:08am
Thanks Lockwelle, I'll read up on how to use the stored procedures, as I have not done this before.
 
Paul


Edited by pgiering - 30 Nov 2010 at 6:08am
IP IP Logged
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