try to new QueryRun(srcQueryPun.pack());
or similar with query.
-----Original Message-----
From: "Neijs, Gideon" <[EMAIL PROTECTED]>
To: <[email protected]>
Date: Mon, 20 Mar 2006 10:48:24 +0100
Subject: [development-axapta] Copying filters from a form to a report
>
> Hi all,
>
>
>
> I'm trying to pass the filters a user has added on a form to a report
> that is based on the same datasources.
>
>
>
> For instance:
>
> I have a form with 1 grid based on CustTable and SalesTable. A user adds
> filters on CustTable.CustGroup and SalesTable.DocumentStatus.
>
> The user clicks a button that calls a report based on them same 2
> datasources. Now I want to apply the same filters on the report.
>
>
>
> I tried this with the following code:
>
>
>
> QueryRun clsQueryRun;
>
> Query clsQuery;
>
>
>
> Report rptTest;
>
> ReportRun clsRR;
>
> ;
>
>
>
> rptTest = new Report('TestReportQuery');
>
> clsRR = new ReportRun(rptTest);
>
>
>
> clsQueryRun = CustTable_ds.queryRun();
>
> clsQuery = new Query(clsQueryRun.query());
>
>
>
> clsRR.query(clsQuery);
>
>
>
> clsRR.init();
>
> clsRR.run();
>
>
>
> This works fine for 1 datasource, but when the second datasource is
> added the report is empty.
>
> Does anyone know a solution for this?
>
>
>
> Regards,
>
>
>
> Gideon
>
>
>
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any attachment
> and all copies and inform the sender. Thank you.
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
http://belugin.info
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/