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 .
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
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
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