By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,489 Members | 1,954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,489 IT Pros & Developers. It's quick & easy.

Printing Reports generated from Temporary Tables

P: 1
I am having problems printing some reports from my application that are generated from temporary tables. The application has an Access FE and a SQL Server BE.

The current method uses a temporary workspace. This workspace uses ODBCDirect which bypasses the JET engine completely. However, these objects are temporary and are destroyed at the end of the function. In order to get the reports working I launch the reports before the object is destroyed. Additionally, I use global temporary tables so the two connections (temp workspace and regular DAO PTQ) can see the table. Now, our issue is that the temp table is destroyed after generating the report. When the user wants to print, Access reruns the report (so it appears). However, now, there are no more temp tables.

The "simplest" workaround would be to get Access to print what is on the print preview. But, it seems that Access has to requery everything rather than use the report it already generated. Is that the way it works?

Has anyone come across this issue before and come up with a workaround?

I appreciate and direction and suggestions you may have to my dilemma. Thanks.
Feb 8 '08 #1
Share this Question
Share on Google+
1 Reply


puppydogbuddy
Expert 100+
P: 1,923
I am having problems printing some reports from my application that are generated from temporary tables. The application has an Access FE and a SQL Server BE.

The current method uses a temporary workspace. This workspace uses ODBCDirect which bypasses the JET engine completely. However, these objects are temporary and are destroyed at the end of the function. In order to get the reports working I launch the reports before the object is destroyed. Additionally, I use global temporary tables so the two connections (temp workspace and regular DAO PTQ) can see the table. Now, our issue is that the temp table is destroyed after generating the report. When the user wants to print, Access reruns the report (so it appears). However, now, there are no more temp tables.

The "simplest" workaround would be to get Access to print what is on the print preview. But, it seems that Access has to requery everything rather than use the report it already generated. Is that the way it works?

Has anyone come across this issue before and come up with a workaround?

I appreciate and direction and suggestions you may have to my dilemma. Thanks.
You are using the MakeTable query as the record source of your report, so whenever you print the report, the MakeTable query executes again. If you just want a file copy of the same report, output the report as a pdf file to a designated directory, and that file will be available for future reprinting.

If you don't already have a pdf driver for your printer, you can download a free one at the following link. It installs as a printer driver via windows control panel and shows up on your list of printers to select from when you call the printer dialog. http://www.cutepdf.com/
Feb 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.