How do you generate meaningful reports in VB6? 
Author Message
 How do you generate meaningful reports in VB6?

Quote:

> I am writing an application using VB6 as a front-end, and MS
>Access 97 as a back-end.  I am quite disappointed in the data access and
>reporting features of VB6, but it is too late to go back now.

> What I would like to do is generate a simple report which lists
>the results of a SELECT query on a few of the database tables.  This is
>easy enough to do using the datareport object in VB6 or Crystal Reports
>add-in.  BUT, I also want to display text fields which can be dynamically
>changed by the application before the report is generated.  For example,
>if the user enters parameters for the SELECT statement, I would like those
>parameters to appear in a text box somewhere on the report.

> Well, I can't find any way using the datareport object in VB6 to
>display a field which is not bound to some (ADO) recordset.  I tried
>creating dummy recordset fields and then changing them to the values I
>wanted with no luck.

> I have just started experimenting with Crystal reports, and I know
>that you can pass a parameter field to the report which can be displayed.
>This would solve the problem, but I would prefer to not use Crystal
>reports if it can be avoided.  I would also like to avoid having to call
>Access to generate reports as the application will be networked and users
>will not have a local copy of Access.

> If anyone has any suggestions on using the datareport object, that
>would be especially appreciated, but I would also be interested in hearing
>general comments on the best way/products to design data reports in this
>kind of environment.  Thank you.

>--
>Ramon Lawrence


>For example,
>if the user enters parameters for the SELECT statement, I would like those
>parameters to appear in a text box somewhere on the report.

Using Crystal Reports, build the criteria string at run time while
generating the sql. Just before you call the RPT file pass the string
to a formula in your report (rpt file). Remember, at design time in
Crystal reports when setting up the receiving formula you have to enter
and save an empty string in the receiving formula -ie: " ".

General comment on using Crystal Reports: it has been my experience
that handling the data processing in Crystal Reports is a head ache
and not worth the hassle. You are much better off using a temporary
table. Use VB to populate this temporary table and have the RPT file
report on data in the temp table only. Before each call to the rpt file,
empty the temp table, build the sql and populate the temp table then
call the rpt file. The beauty with this method is that you can structure
your temp table to accomodate the rpt file's reporting structure

Rob



Mon, 06 Aug 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How do you generate meaningful reports in VB6?

2. Problem in generating reports in .Net but the same reports work in VB6 application

3. call a report generated in Access97 from an VB6 Application

4. * Generating a report via VB6

5. * Generating a report via VB6

6. MCI control doesn't generate DONE Event

7. MCI Control Gets Into a Tizzy - Done Events Not Being Generated

8. VB6 - SP5 exe generates drWatson during OLE communication with VB6 - SP3 exe

9. Crystl32.ocx shows blank report at second time report is generated

10. How to generate Report from Crystal Report

11. Use a Meaningful Subject with Your Posting

12. Use a Meaningful Subject with Your Posting

 

 
Powered by phpBB® Forum Software