|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Updating a Database with a ReportSometimes ,we receive a request to develop a report to change data in a database. We can see several ways to do this, but we don’t recommend you use any of those methods. We believe that every report should be able to be reprinted and reprocessed using the same data and getting the same results. If a report changes that database during processing, it is a volatile report and reruns cannot be handled in the usual way. For this reason, we have not developed a User Function Library (UFL) that can update SQL databases. There are UFLs that do this, but we prefer a more robust and repeatable production or ad-hoc solution. We have developed a better way to combine the two steps of a report and a database modification. In another article, we suggested you use a report to build a SQL Update statement, and then export this to a text file. Then paste the text output into a SQL tool and apply the update your database in a second step. You can now automate this by combining our File Management UFL with our cViewSQL utility. Use a formula to build the SQL Updates you need in your database. Then use cViewSQL to process these lines. Breaking the task into two steps makes it a lot easier to develop, test, and maintain. See below for information on these two utilities.
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. |
About File Management UFLOur File Management User Function Library allows you to delete, copy, rename, or manipulate files and folders on your machine from within Crystal Reports. Free 30-day trial. Hot tip: Crystal Reports can treat your hard drive as a database. So write a report to select all the files in a folder with a last modified date, and use the DiskFileCopy function to make a copy of those in a date specific folder on your backup drive. The File Management UFL was originally developed to solve a specific problem. A city council had a database of documents and plans that where on file and what actions were needed with them. They wanted to know if it was possible to have a report listing all the documents in the database. They also wanted that report to check and show whether those documents were still where they were supposed to be on the file server. After the original development, we added other features. You can use the File Management UFL for such things as:
About cViewSQLcViewSQL is a powerful database utility that lets you process SQL commands against a database using an ODBC connection. It supports ODBC compliant database (e.g. MS-Access, SQL-Server, Oracle, MS-SQL). Unlike many other SQL command processores, it's easy to run. Free 30-day trial.cViewSQL connects to a database using an ODBC connection. It can process SQL statements in that database. It supports ODBC compliant databases (e.g. MS-Access, SQL-Server, Oracle, MS-SQL). And, it's easy to run. You can manually run cViewSQL from the user interface, from a command line, or scheduled in a BAT file. Or, you can schedule it in our cViewMANAGER or cViewSERVER report schedulers.
|