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

How To Export an ACCESS Report With Filte

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
-----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


Nov 12 '05 #2

P: n/a
Thanks
You are Perfectly right
Thanks

MGFoster <me@privacy.com> wrote in message news:<c4*******************@newsread1.news.pas.ear thlink.net>...
-----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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.