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

Newbie ? about CR7 and VB6 1

Status
Not open for further replies.

dmc874

Technical User
Sep 3, 2001
7
US
I have a very basic question that I am sure all of you know how to do. I am very new at this so please excuse my ignorance. I have a report that I have designed and can use manually that gets its information from a SQL server. I want to make a VB app to run the report because it needs to run at 1:00 and eventually there will be 39 reports run from the app. The question I have is what statements and where do I need to put them to have VB log into the SQL server and have the output exported to an HTML file in a specified location. One other issue I can see is how do I keep the other reports from starting before the one before it is finished? Thanks.

Dave
 
You can create a batch VB application (no GUI forms) that connects to SQL Server, runs the report / exports the report to a destination directory. You could run execute multiple reports, one after another, in the batch VB app.

You should also think about making the VB application flexible, in that it reads from a SQL Server table what reports to run, what format to export each report to, and the location of where the file export is to be saved.
 
Those are good ideas, but I still do not know the statements that log into the server or tell the report where to export and how. Any ideas? That is a really good idea about the table of reports. Thanks.

Dave
 
You can go to:


and type "Visual Basic Example" to Ask Jeeves. The results of the query will lead you to a lot of zip files of small apps in VB / Crystal.

The manuals that come with the Crystal Reports Developer Edition are very good as well.
 
There are a series of articles in Crystal Clear, our free newsletter for CR designers. Go to for back issues.

The first decision to make is to use the RDC or OCX. The OCX is easier but don't give you as much control over your report. With the OCX, the connection to the DB is..
crObject.Connect="DSN=myDB;uid=me;pwd=mypassword"

the RDC needs a few more lines.

I've already written a report scheduler so would be happy to share ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top