473,769 Members | 7,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing reports in MS Access from a C# Windows app

I was wondering if it is possible to take a canned report ( on an
Access database (Access XP version), and then be able to write a C#
application that will make a call to the canned report in Access and
print it (just as you would print the report while in Access)? If so,
could you give me an example so I could follow the syntax. Printing
from a C# application isn't as graceful as going into Access and just
running the report and printing it. Any ideas on how to make this
work so the users don't have to learn how to open the report in Access
and print it? Just trying to make users lives simpler.
Nov 12 '05 #1
2 4199
On 25 Nov 2003 15:05:40 -0800, mj*****@hotmail .com (Matt Sogla) wrote:

Use Automation.
Create an Access.Applicat ion object. Then Application.DoC md.OpenReport
etc to print the report.

-Tom.

I was wondering if it is possible to take a canned report ( on an
Access database (Access XP version), and then be able to write a C#
application that will make a call to the canned report in Access and
print it (just as you would print the report while in Access)? If so,
could you give me an example so I could follow the syntax. Printing
from a C# application isn't as graceful as going into Access and just
running the report and printing it. Any ideas on how to make this
work so the users don't have to learn how to open the report in Access
and print it? Just trying to make users lives simpler.


Nov 12 '05 #2
Tom -
Do you have any examples of this or is there any HELP related topics
that demonstrate this?

Use Automation.
Create an Access.Applicat ion object. Then Application.DoC md.OpenReport
etc to print the report.

-Tom.

Nov 12 '05 #3

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

Similar topics

1
2932
by: AAVF | last post by:
We have a problem that has only started in the last few weeks. We have an Access 2000 database running on a P300 Win98 PC. The PC outputs Access reports to an HP LaserJet 5L printer, connected to an HP 170 JetDirect on an internal network. The PC has McAfee anti-virus (v7, fully up to date) and all Windows 98 critical and non-critical updates loaded. Recently, certain reports are printing with either the occasional incorrect character...
1
3013
by: Hank Reed | last post by:
For about a year I have been printing pdf files from Access 2000 using the ShellExecute Me.hWnd, "print", FileName, "", 0, SW_SHOWNORMAL We normally print, from 1 to 100 engineering documents in this way. Now I would like to intermingle (Collate) the pdf files with the Access reports: i.e. Access Report - pdf file - Access Report - pdf file When I loop though the list of reports - pseudo code here:
1
1931
by: John | last post by:
Hi I am looking into Oki ML 590 and ML 591 printers to see if any of these will work with multi-part (multiple copies) continuous stationery for printing invoices from access. Has anyone had any experience of these printers or can recommend another one for printing on multi-part continuous stationery from access? Thanks
16
48886
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use a commercial program such as Adobe Acrobat and its associated API. The technique uses Ghostscript and Redirection Port Monitor - two free programs for creating PDF documents provided free by Russell Lang. The actual automation requires VBA...
2
5848
by: Benny | last post by:
Hello Experts, Currently I working on a web application using vs.net with C#. I require to create an invoice to a text file and print the file. I have no problem with writing to the text, but how can I print a text file using C# in a web application? Any articles that shows you how can this be done will be great.
0
1837
by: Nigel | last post by:
I successfully create a .NET Component (Visual Basic .NET) that would print, unfortunately when used within a web browser it appears that .NET security doesn't allow you to run code that interacts with the file system (including printing) from the web browser. How do I disabled this so I can get my windows form control to work within IE? Also, do any have any printing code or know how I can implement multipage printing using the...
1
2427
by: Stinky Pete | last post by:
Hi, I've been reading, and successfully tested some code referred to in this group, that allows a user to select a printer before printing a report. The code has worked well on single page reports, however I want to expand the logic and I'm getting lost. I've got a form that needs to be printed via multiple reports which print with the DoCmd.OpenReport option as they print one after the other. However, due to the number of pages,...
4
1549
by: joel | last post by:
Is there a way (code, plugin, etc.) to output a single Access report as multiple reports? Preferrably, I want to control the output target by data in the record group. The scenario is this: We have a 500 page report that encompasses all of our clients. We need to automatically deliver reports by-client to specific printers. Other than outputting 1st to PDF, then manually re- printing "pages n..n+5" or whatever, we do not have a way....
1
6251
by: billelev | last post by:
Here is some code that I have adapted slightly. It allows a report to be printed to a specific location. It works by calling SaveReportAsPDF and specifying the access report name, and the root directory to which the filename should be saved. The routine adjusts registry values to achieve its aim. Now, it works, but not quite as I would like it. I originally thought that I would be able to adjust a registry key (such as...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10048
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5304
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.