-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Syntax of Jet 3.6 & 4 of OpenReport:
OpenReport(ReportName, View, FilterName, WhereCondition, WindowMode,
OpenArgs)
Put the Filter in the WhereCondition parameter, e.g.:
State='MA'
Like a WHERE clause in SQL.
But, this won't export the report to an HTML page. If I were
exporting a report to an HTML page & wanted to filter the data I'd put
some VBA code in the report's OnOpen event procedure that would "ask"
for filter criteria from the user, or pick up the criteria from some
form/table/query.
MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBP8GdmYechKqOuFEgEQKxqgCfW4Da1yzx3iy2yLO+fl/0ev47MRAAoOTz
3VDAq8ZP/5lhwMnwQjQBx6Oq
=kmc/
-----END PGP SIGNATURE-----
Vikrant wrote:
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