Last post Sep 17, 2010 10:07 AM by hans_v
Sep 16, 2010 11:36 PM|artom.b78|LINK
I have my code output a gridview with all the data with an option to select records. I'm trying to make a code which would allow me to select a record, and then print this record using a specific Report stored in MS Access.
I've located the code to print the Report it self, but it prints ether all the records or a range.
Sep 17, 2010 02:56 AM|hans_v|LINK
Access Reports are not available in a web enivironment, because you don't connect with an Access database but with a Jet Database engine. Only Tables and Stored queries are accessible....
Sep 17, 2010 09:29 AM|artom.b78|LINK
I've looked up an article which says it can be done with a few lines as such
Set objAccess = CreateObject("Access.Application")
Set objCommand = objAccess.DoCmd
But that only, supposedly, prints the actual report.
I don't need to display it, just pull the report of a specific record and send it to a printer in the background.
Sep 17, 2010 10:07 AM|hans_v|LINK
I've looked up an article which says it can be done
this example is using office automation, it is recommended not to use that in a web environment:
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit
unstable behavior and/or deadlock when Office is run in this environment."
But if you use it anyway, realize what your doing. You're opening access on the server(access needs to be installed on it), and you can only print it on a printer that is connected to that server. In your development machine, the server is the same as you
client, so it might work, but in a live environment, there's no way to print the report on client side....