Report in Visual Basic from MS Access data 
Author Message
 Report in Visual Basic from MS Access data

I was hoping someone out there could help me to
figure out the best way to solve my problem in
Visual Basic 6.0/MS Access 97.

OK here's my problem: I'm writing a VB program
that uses a MS Access database to store results
from a series of printer tests.  What I want
to do is to print out a report of the complete
test results for one particular printer.  The
results are spread across several tables, linked
by various ID's.

I can think of a number of ways to do this -
1) use the VB DataReport designer to create a
report, and find a way to code in the values from
the recordset objects I already have in the
program.  Unfortunately, reports don't seem to
allow control arrays and i have 288 x 4 = 1152
pieces of data to display, so hardcoding it all is
stupid, tedious, and inefficient.  Also it doesn't
seem to take to setting values of the controls
from the code.

2) find some way to pass values from VB to MS
Access and use the passed values in the criteria
of a query i will create, and base a MS Access
report off the criteria.  Since it's easier to
change the control source of the MS Access report
fields, and I could narrow down the records in the
query to be exactly the ones I need, this should
be less time-consuming and stupid than the
DataReport designer.

3) create a report in MS Access and somehow base
it on a query created in the VB program so that
the value can be specified in that query at
runtime and then the Access report will just
naturally follow.

In fact, the only criteria that needs to be passed
between the program and the database is the name
of the printer... everything else follows from
there within the database.

4) I have created a form to display the data (much
easier to handle with the control arrays, etc),
but I can not increase the size of the form beyond
the desktop size.  I'd like to be able to just
print the image of the form out - not the best
solution, but all right - but b/c of the size
limitations and the fact that I have 288 pieces of
data per form, all the data ends up squeezed
together in the top 2/3 of the paper, which looks,
to say the least, pretty bad.

If someone could point me in the right direction
as to which solution (or what other solutions)
would be the best to use, and how to do them, I'd
be greatly appreciative.


Sent via http://www.*-*-*.com/
Share what you know. Learn what you don't.

Sun, 10 Feb 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Regarding Accessing External database using MS-Access and MS-Visual Basic

2. MS-Access report in Visual Basic

3. MS Access Reports In Visual Basic

4. MS-Access report in Visual Basic

5. Crystal Reports x Visual Basic 4 x MS-Access 7

6. Visual Basic, Access Basic or MS-Access??

7. MS Access Reports In Visual Basic

8. MS-Access report in Visual Basic

9. Visual Basic, Access Basic or MS-Access??

10. MS-Access report in Visual Basic

11. Can't open data control in MS Visual Basic Editor for MS project

12. from visual basic to access report(send query to access report))


Powered by phpBB® Forum Software