Printing Reports generated from Temporary Tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • popwhub
    New Member
    • Feb 2008
    • 1

    Printing Reports generated from Temporary Tables

    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.
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by popwhub
    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/

    Comment

    Working...