Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hold or Lock Data

Status
Not open for further replies.

BoeingSK

Technical User
Nov 2, 2007
36
US
I am using Crystal reports XI and I have a report that is tracking orders with dollars spent. I have a Summary at the bottom for the grand total.
I don't know how to do a subtraction formula because everytime i update I lose the old data.How can I keep the old prices still.
 
I am pulling all the data from the Purchase orders. I have the cost of the item as my last column. I have a summary of this column in the Page footer.
If an item was $3.00 and increase to $4.00 I want to create a field That would show me the increase or decrease between updates.
I see this being difficult because everytime I update I lose the old cost therefore, prohibiting me from putting a formula subtracting old from new values.

Up and Coming Technical Guy
 
How do I get the previous data to freeze so I can compare it to the refreshed data.

Up and Coming Technical Guy
 
There is a Crystal function Previous()
create a formula

Fieldname -Previous(fieldname)

this will give you the difference

Ian
 
Sorry did not read your post correctly.

Surely you must have a history of costs somewhere. YOu will need this for audit purposes.

Ian
 
what if the price goes up or down is there a way to say show me the difference either way. Negative or Positive.

Up and Coming Technical Guy
 
I used that previous function and it subtracts from the previous line above, not the previous data of the same line.

Up and Coming Technical Guy
 
The data needs to be held in the database. Crystal cannot magically guess a non-existant value.

If you require this functionality then you need to go back to your DBA and request this feature in your database.

'J
 
I think the link IdoMillet provided is the only realistic approach to solve this via the use of a UFL to carry out the write to the local machine.

The difficulty then would be that it would only store the data at the last runtime, if multiple people need to see the data then it would have to be in a shared location.

A number of things to consider, I stand by the comment that this requires better db design.

'J
 
Well I think I've got, with a combination of Excel. I went to Excel and pulled the same tables and data in to an Excel report. Then I came back to Crystal and made that report a separate database and table with a link on like data.
I pulled the same price field into the report and checked for a price update. Amazingly this worked. If I update Crystal and don't go back and update the Excel file then I keep the old data.
Then I created a formula to subtract the Excel Subtotal field from the Database Subtotal and I have what I need. Thanks for your help, anyway.

P.S. The only thing I haven't figured out is that the report is hold my excel file, if I try to go open it , I get a message saying that it is read only. How do I get Crystal to release it in case i want to Update my Excel file.

Up and Coming Technical Guy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top