|
-
Feb 21st, 2008, 02:19 AM
#1
Thread Starter
Frenzied Member
Problem with formula
Hi to All:
First of all i'm newbie with CR and his formulas...
I have this little code in crystal reports in one formula:
Code:
if {lancamentos.livro}="Venda de Mercadorias" then
sum ({lancamentos.txredvaloriva})
The code reconize the instructions the problem is that sum sum all the records,in the field lancamentos.txredvaloriva,but I just want the instruction sum sum the records that be "Venda de Mercadorias"...
Any suggestion please?
Thanks
-
Feb 22nd, 2008, 08:16 AM
#2
Re: Problem with formula
I don't know that much about CR Forumlas, but do they support a WHERE clause?
-
Feb 22nd, 2008, 08:57 AM
#3
Thread Starter
Frenzied Member
Re: Problem with formula
Hi:
I think so not...It was easy if the CR had a Where clause like SQL!
In fact I don't know the way to resolve this!!
-
Feb 22nd, 2008, 01:24 PM
#4
Re: Problem with formula
Are you using a frontend for your program?
-
Feb 22nd, 2008, 02:32 PM
#5
Re: Problem with formula
Crystal generates the Where clause based on the information in the Record Selection formula (Report -> Edit Selection Formula -> Record menu). You don't need the If statement just the following
{lancamentos.livro}="Venda de Mercadorias"
As for the Sum, the easiest way is to add the database field onto the report. Then Right-Click on that object, select the Insert menu item and then the required summary that you want to perform.
-
Feb 22nd, 2008, 08:34 PM
#6
Thread Starter
Frenzied Member
Re: Problem with formula
Hi:
And don't know the way to insert from database the field into the report...
I think you refer to the field "txredvaloriva" right?
-
Feb 25th, 2008, 05:20 AM
#7
Frenzied Member
Re: Problem with formula
 Originally Posted by sacramento
Hi:
And don't know the way to insert from database the field into the report...
I think you refer to the field "txredvaloriva" right?
You should see a Field Explorer to the left (unless you have meddled with the default settings). If it is not visible click View->Field Explorer. You should find several entries click the one which says Database Fields. This should open all the tables/views you have added (Linked) to the CR. Click further the reqd T/V you should find all the Fields of the T/V. Now pull the Field you want to summarize
-
Feb 27th, 2008, 03:46 AM
#8
Thread Starter
Frenzied Member
-
Feb 28th, 2008, 02:51 AM
#9
Frenzied Member
Re: Problem with formula
welcome
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|