Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize

Crystal Reports: Free trial

Articles:
Administration
Advanced
Basic
Crystal eNL
Database

Financial
Problems Solved

Books:
CR Books

Database Books
Developer Books
Tools:
All CR Tools
CR Analyzers
CR Bestsellers
DataBase Tools
CR Graphics
International
CR Mail UFLs
ReCrystallizePro
CR Schedulers
CR UFLs
CR Viewers

Add'l:
About us

Contact Us
cViewSUITE Ppt
Support

Crystal Reports
on Steroids

Crystal Reports: Generate SQL to Change Selected Records

See also:

 

Use CR to generate SQL to change selected records.

The database was wrong. We could see it had incorrect values for some of the records. We could write a Crystal Report to find the errors and even to calculate the correct value to put back in the field. So why not use CR to generate the SQL we needed for the update?

Use the error report as the foundation for a new report. Remove all fields and create a new formula that looks like:

“UPDATE myTable SET ThisField=’” + {@NewValue} + “’ WHERE RecordID=” + {Table.RecordID} 

The report is now a long list of SQL UPDATE commands. Export the Report to a Text File and then use the Text in a SQL Query tool. This can update hundred of records with a few mouse clicks.

For another aspect of this, see this article: udpatedatabasewithreport.htm

 

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.

These keywords may have brought you here: sql, change records, generate sql in crystal reports, database correction, record correction, crystal reports tutorials, crystal reports articles, crystal reports information, crystal reports software, crystal reports training, crystal reports downloads, crystal software, crystal downloads