Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula Field Post Reply Post New Topic
Author Message
Sharon2013
Newbie
Newbie


Joined: 19 Jul 2013
Online Status: Offline
Posts: 5
Quote Sharon2013 Replybullet Topic: Formula Field
    Posted: 23 Jul 2013 at 8:15am
I am trying to populate the Total Balance. The data source is SQL.I want the formula to be calculated in crystal and then reflect in SQL. Is it possible?

This is exactly how I go about it:
FormulaField> New > Balanceformula .In Formula Editor :
Invoice_generated.Bal}={Invoice_generated.AmountPaid}- T{Invoice_generated.Invoiceamount}


It gives me an error : Composite function. Pls check formula editor. How can I fix this .
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 23 Jul 2013 at 11:13am
Hi,
 
"I want the formula to be calculated in crystal and then reflect in SQL"
Do you want to send the value from Crystal to SQL?
If Yes, then it is not possible with Crystal. because Crystal is a reporting tool, which is used to fetch the data from database.
 
and
={Invoice_generated.AmountPaid}- T
what is T here, did you decalre the variable(T) in other formulas in crystal?
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 24 Jul 2013 at 4:54am
No, Crystal will not write to the database, so a calculation done in Crystal cannot be written back out to the database.

On-the-other-hand, if you used a stored procedure, you could do all the logic to calculate the total in the procedure and store it in the database, and return a dataset to Crystal to display.

Personally, I don't like stored procs that are meant to gather data for a report to update any data (can make the report hard to reproduce at some time in the future (and I believe that reports should always display the same results regardless of date run, when run for the same parameters).

I can see a stored proc updating a list of when/by whom the report was run, but that isn't really changing the data of the report

HTH
IP IP Logged
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.016 seconds.