Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: formula problems Post Reply Post New Topic
Author Message
mini987
Newbie
Newbie


Joined: 01 Dec 2011
Location: Croatia
Online Status: Offline
Posts: 8
Quote mini987 Replybullet Topic: formula problems
     Posted: 16 Apr 2012 at 8:06pm
hi everyone,

i have problems with writing formula,

i need data from the same field for different dates, for example

{InvReceiptTran.Qty-on-Hand-Purchase} on the 1/1/2011 then
{InvReceiptTran.Qty-on-Hand-Purchase} on the 31/2/2011 and so on...

could anyone help please?!
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 17 Apr 2012 at 4:09am
A bit more information is needed.
What is the structure of the InvReceiptTran table?  There must be dates in there to compare to  your 31/2/2011 etc.
IP IP Logged
mini987
Newbie
Newbie


Joined: 01 Dec 2011
Location: Croatia
Online Status: Offline
Posts: 8
Quote mini987 Replybullet Posted: 17 Apr 2012 at 9:47am
field is the income of merchandise that was on that day on warehouse
it is something like this:

on 1/1/2011 was:

books - 1250
magazines - 1000
and so on....

i already put the parameter for time, so i can select date range, from 1/1/2011 to 31/12/2011, but on the 1/1/2011 we already had some books on warehouse, and i need to sum them with the rest of the books that came and went out from the store, and because of that i need the formula that will give me exact number on specified date :)
IP IP Logged
mini987
Newbie
Newbie


Joined: 01 Dec 2011
Location: Croatia
Online Status: Offline
Posts: 8
Quote mini987 Replybullet Posted: 19 Apr 2012 at 1:18am
anyone???? :/
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 19 Apr 2012 at 5:51am
you could try something like
first create a formula
books
if table.date = date(2011,1,1) and
table.data_type = "books" then table.item_qty

next create a formula for sum
books_sum
sum(@books)
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