crystal reports viewers, crystal reports schedulers, view crystal reports, report analyzers, burst reporting, report scheduler
 
view crystal reports, rpt viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler
desktop viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize
 


Articles:
Administration
Advanced
Basic
Crystal eNL
Database
Financial
Problems Solved

Books:
CR Books

Database Books
Developer Books

 
Tools:
Analyzers
Bestsellers

CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs
ReCrystallizePro


Add'l:

About us

Contact Us
cViewSUITE Ppt
Support

 

CrystalReports
on Steroids

Crystal Reports: Updating a Database with a Report

Sometimes ,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 UFL

Our 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:

  • File Backup. Crystal Reports can use the file system as a data source. Write a report to list all the files in a folder and copy them to a date stamped folder on another drive
  • File Archive. The File System data source also includes the dates a file was last written. Look at a folder and any used over a certain age could be copied to another folder. 
  • File Security. The file system at a business site shouldn't be used to store MP3 music files or AVI video files. So write a report to list them all, and delete them if found. Could use a similar approach to remove JPG or BMP files over a certain size in the user files.
  • Remove Duplicates. Excel Spreadsheets are being saved in local user drives rather than in the server. Use the File System to identify duplicate files and delete the duplicate copies.

 

About cViewSQL

cViewSQL 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.

  • Connects to any SQL data source.
  • Simple Windows application.
  • Can export data to CSV, HTML or XML.
  • Can export data to disk or email.
  • Central database password security control.
  • Can be scheduled using our cViewMANAGER or cViewSERVER report scheduler. You can even use the Windows task scheduler.
  • Log can be local to each application or saved centrally to cViewSERVER or cViewMANAGER log.