Board index » delphi » MS Access reports preview

MS Access reports preview

Hi
I have spent ages trawling the news archives in order to use D4 with OLE and
Access reports.

If  I use
                  AccessApp.doCmd.OpenReport(ReportName);

everything works well and I get a printed report. However, I wish to get a
preview first. I have tried

                  AccessApp.doCmd.OpenReport(ReportName, acViewPreview);

and get an unknown identifier for acViewPreview. If I use 0 as the parameter
then the report prints as usual. Trying 1, - 1, 2 has not worked. Any help
would greatly be appreciated.

John

 

Re:MS Access reports preview


You must use the next const value:
  const
    acViewPreview = $00000002;

Anyway I posted a tip with sample code for this subject:
"Delphi tip#83: print/preview in MS Access's report"
http://www.scalabium.com/faq/dct0083.htm

--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

JG <jgt...@powerup.com.au> D??? ???Y??:3d2cfe45_1@dnews...

Quote
> Hi
> I have spent ages trawling the news archives in order to use D4 with OLE
and
> Access reports.

> If  I use
>                   AccessApp.doCmd.OpenReport(ReportName);

> everything works well and I get a printed report. However, I wish to get a
> preview first. I have tried

>                   AccessApp.doCmd.OpenReport(ReportName, acViewPreview);

> and get an unknown identifier for acViewPreview. If I use 0 as the
parameter
> then the report prints as usual. Trying 1, - 1, 2 has not worked. Any help
> would greatly be appreciated.

> John

Other Threads