How To Export an ACCESS Report With Filter

  • Thread starter Thread starter vikrant
  • Start date Start date
V

vikrant

Hey Friends

I need to export an Access Report using a filter.

I am using the method OutputTo

m_pDoCmd->OutputTo(
3, // asOutputReport
COleVariant(strReportName), // <report name>
COleVariant(_T("HTML (*.html)")), // acFormatHTML
COleVariant(_T(strHtmlFileName)), // <report name> + .html
COleVariant((short)0, VT_I2), // autostart ?
COleVariant(_T("")));

I found that there is another method

ie

OpenReport which allows to apply a filter but it do not give me an object of
Access.Report

Is there any way so that we can combine and Export a Report with a filter ?

Plz Help

How To Export an ACCESS Report With Filter
 
Open the report in preview mode. (This allows you to
apply the filter)

Then Output the report (You can output a report that
is already open in view mode, and it keeps the filter)

Then close the report preview.

(david)
 
Back
Top