473,473 Members | 2,169 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Access report from vb.net?

Can I call an Access report from VB.Net? (I'm using access as the backend.)

Thanks in advance.
Nov 12 '05 #1
2 15413

"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.)

Unless yours is a very unusual VB.Net application, you are using the Jet
database engine as the back end, with ADO.NET to handle the data retrieval,
and Access is nowhere involved.

Access is the UI and development tool, Jet is the default DB engine for
Access and other MS software.

All that said, using automation, you could run an Access report if Access
and an Access application including the Report are installed on the server
if it is a .NET web app (or the Windows workstation, of it is a .NET Windows
app). A VB.NET newsgroup might be a better source for using automation in
..NET -- it'll be somewhat different, I suspect, than using automation in a
non-.NET envoronment.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #2
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.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
1
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
20
by: John | last post by:
Hi, I've recently upgraded from Access 97 to Access 2002 & the performance basically stinks. I have tried the following items listed below but it has only had a minor impact: 1) Upgraded Jet...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
2
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
6
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.