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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does crystal write data too?

Status
Not open for further replies.

Legion13

Programmer
Aug 31, 2000
27
US
Hello,
I am fairly new at this whole database business so bear with me. :) I am working on a report where the client wants to be able to keep a monthly history of the report data so they can use it to track trends. The data in the selected tables is liable to change over a period of months, so I need to take the appropriate information from my table and write it to another table so can keep a snapshot of the data as it was at that time. Is this possible in CR 8.0? I have found plenty of info on pulling data but not much on pushing it back in. Thanks in advance.

P.S. this forum is a wonderful resource and I want to say thank you to all of you who contribute answers here. I have learned quite a bit from all of you.

[sig][/sig]
 
Legion,

Bad news, Crystal itself is a read only tool, and therefore can't update any records.

It can export, which is as close as you can get. You can even export records back into an ODBC connection, but only to a new table. You can't place the records into a table or even append them to a table from Crystal.

What you might want to do is run the report off of a recordset in memory, and use the recordset to update the database from your program. [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
Mr. Hamady,
Thank you very much for your quick response. One more question in light of this information. The database I am using is SQL Server 7 and and after reading through this forum I noticed a lot of people discussing stored procedures so I looked them up and the are supported in SS7. Would it be possible for CR8 to activate a stored procedure that can modify an existing table, or would it still suffer from the same restrictions even though it is stored as a SQL script in the DB?

[sig][/sig]
 
I don't know of an explicit limitatiion, but I have never tried it so someone else will have to answer that definitevly. It is an interesting idea. You might get some clues from the following Seagate KB articles, but they are a bit over my head.




Crystal has two ways to snapshot data, but neither is as automatic as what you suggest, if it work:

1) save the report with it's data (under another name)

2) Use the SQL editor to create a Query, update, refresh and save the query with its' data each time and then run the reports off of the query files. [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Training by Ken Hamady</a><br>[/sig]
 
Thank you very much for your help. I will take this info and run with it. :)
[sig][/sig]
 
Because of the extreme flexibility of stored procs, you should be able to do just about anything (create databases, tables, inserts, updates) and then report on some or all (or none) of what you have done.
As for the cursor info supplied by Ken, you likely won't have to get into that.
Perhaps we should start a Stored Procedure/Crystal Reports fan club... [sig][/sig]
 
Those were my thoughts too after reading about stored procs. Thanks for confirming for me though. As for a fan club, I'm in. Hehe.
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top