Hi, 
 
I did not check the following code, but it should work...
 
 
formRun   formRun;
object      object;
formRun = element.args().caller();
object    = formRun;
localEnumField = object.parmFormEnumField();
 
So use accessor (parm) method to get your value.
 
Bye Jörg

________________________________

Von: development-axapta@yahoogroups.com im Auftrag von sivlogu
Gesendet: Di 08.01.2008 07:05
An: development-axapta@yahoogroups.com
Betreff: [development-axapta] Re: How to pass Query from Form to Report?



Hi,

Thanks a lot for your reply.

I dont know where i am wrong in the follwing code. Can anybody 
suggest me.

Folloing is a code in Form. (Dcpcategory - Enum; dueoption - Combo 
Box with Enum)

Dcpcategory getEnum()
{
return dueoption.selection();
}

But i could not call this method from Report as follows.

DCPCategory dcpc;
FormRun fr = element.args().caller();
dcpc = fr.getenum();

I am getting error as "The class FormRun does not contain this 
function." in the 3rd line as shown above.

Any help?

Thank you,
Logu

--- In development-axapta@yahoogroups.com 
<mailto:development-axapta%40yahoogroups.com> , tarun jalhotra 
<[EMAIL PROTECTED]> wrote:
>
> Hi 
> 
> One of the ways you can do it is ......Call a function which 
returns the value from the form to the report.
> 
> formRun fr = element.args().caller();
> enum = fr.getEnum();
> 
> where getEnum() is function on the form which returns the value 
or selection of that combo.
> enum is of same type of variable
> 
> Regards,
> 
> 
> 
> sivlogu <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> It works great for me...Thanks a lot.
> 
> Just i am suffering to pass one Enum value (Combo Box) from the 
same 
> Form to Report.
> 
> Any inputs will be the great.
> 
> Thanks again,
> Logu
> 
> --- In development-axapta@yahoogroups.com 
> <mailto:development-axapta%40yahoogroups.com> , <joerg.ufer@> wrote:
> >
> > Hello, 
> > 
> > 
> > 
> > for example: 
> > 
> > 
> > 
> > in your report fetch-method:
> > 
> > 
> > 
> > formRun fr = element.args().caller();
> > 
> > formDataSource fds = fr.datasource();
> > 
> > query q = new query(fds.queryRun().query
> ());
> > 
> > ;
> > 
> > 
> > 
> > queryRun = new queryRun(q);
> > 
> > While (queryRun.next())
> > 
> > {
> > 
> > custTrans = queryRunGet(tableNum(custTrans));
> > 
> > this.send(custTrans);
> > 
> > }
> > 
> > 
> > 
> > Bye
> > 
> > 
> > 
> > Jörg
> > 
> > 
> > 
> > ________________________________
> > 
> > Von: development-axapta@yahoogroups.com 
> > <mailto:development-axapta%40yahoogroups.com>  [mailto:development-
> [EMAIL PROTECTED] <mailto:axapta%40yahoogroups.com> ] Im Auftrag von 
> Loganathan Sivaswamy
> > Gesendet: Freitag, 4. Januar 2008 10:53
> > An: development-axapta@yahoogroups.com 
> > <mailto:development-axapta%40yahoogroups.com> 
> > Betreff: [development-axapta] How to pass Query from Form to 
> Report?
> > 
> > 
> > 
> > Hi guys,
> > 
> > I am new to Ax.
> > 
> > 1. I have created one form with CustTrans table.
> > 2. I have created one report with CustTrans table.
> > 
> > In new form i have added some dataranges. 
> > 
> > I would like to run the report from Form for the set of records 
in 
> From.
> > How can i pass the (query) record from new form to report? 
> > 
> > Thanks in Advance,
> > Logu
> > 
> > ---------------------------------
> > Looking for last minute shopping deals? Find them fast with 
Yahoo! 
> Search.
> > 
> > [Non-text portions of this message have been removed]
> > 
> > 
> > 
> > 
> > 
> > [Non-text portions of this message have been removed]
> >
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with 
Yahoo! Search.
> 
> [Non-text portions of this message have been removed]
>



 


[Non-text portions of this message have been removed]

Reply via email to