Yes... but... it's not pretty.
You would have to instanciate an instance of access, open the database, open
the report, and print it using automation code. I've done it before and it
works fine. It's a little slow and the client computer has to have Access
installed. You can do the whole thing while keeping Access invisible.
If you want to do the .NET way... you would use Crystal Reports to build the
report with. Choose to add a new item, choose Crystal Report, use the
wizard to start with, connect to your mdb, choose the
table/grouping/sorting/layout, save it as myCrystalReport.rpt. Then make a
..NET form, drop a CR Viewer control on, then do this on some event...
Private Sub someButton_Click......
Dim crDoc as ReportDocument
crDoc = new myCrystalReport 'note that the report becomes a class that you
can now instantiate.
'parameters are more complex, but pass them to the report here, note that
the "Parameter Fields" node is where you add parameters and the "Select
Expert" on the report designer is used to tie the parameter to the field.
Parameter syntax on the "Select Expert" is like this... {?@myParam}
crViewer = crDoc
End Sub
Good luck! Let me know how it turns out.
--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
"Tom Weddell" <tw******@optonline.net> wrote in message
news:bo*********************@news4.srv.hcvlny.cv.n et...
Can I call an Access report from VB.Net? (I'm using access as the
backend.)
Thanks in advance.