You should first create an Extended Data Type for the id field, with
relationship for table1.id. You should use this EDT on both tables's id
field.
--
Then create a menuitem for form 2.

Use this menuitem to make a button on form 1
Then overwrite clicked-method on the button.
void clicked()
{
    Args            args;
    ;
    args = new Args();
   
    args.record(Table1); //Same as name of datasource
    args.parm(AgeControl.value); //remember to Autodeclare this one
    new Menufunction(menuItemDisplayStr(form2menuitem),
MenuItemType::Display).run(args);

    super();
   
}

----
On form 2:

Classdeclaration:
int age;
QueryBuildRange rangeAge;
---

Overwrite init-method

age = element.args().parm;

--
Form 2 datasource, overwrite init.

rangeAge =
this.query().dataSourceTable(TableNum(table2)).addrange(FieldNum(table2,
age));
   
rangeAge.value(age);

---------

Good luck. If you have any problems, let me know.

Sincerly,
Morten

-----Original Message-----
From: axapta_dude [mailto:[EMAIL PROTECTED]
Sent: 10. juni 2004 15:30
To: [EMAIL PROTECTED]
Subject: [development-axapta] Filtering Data

hi....i need some help from you guys
here is the simplify version of my problem:

Table1                                                      Table2
----------------------                         -------------------------
|   id   |   name   |   age   |                          |   id   |
location  |   tel.no   |
----------------------                          -------------------------
|   34  |    John    |   20    |                          |   34   |    MO
|   123      | 
|   21  |    Mark   |   35    |                          |   21   |    UP
|   321     |
|   45  |    Will     |   20     |                         |    45  |    SS
|   456     |
----------------------                         -------------------------

-->I'm using id as a relationship for both tables


Form1
----------------------
|   id   |   name   |   age   |
----------------------
|   34  |    John    |   20    |
|   21  |    Mark   |   35    |
|   45  |    Will     |   20     |
----------------------

--> On form1, I want to put a button that link to another form(form2) that
contain option   
       for filtering


Form2

Age: _______    -->user must input the age they want to filter

--> On form2 i want to put a button that link to a report.



Report (assuming that user key in "20")
-------------------------------------------------
ID    |     Name     |     Age     |     Location     |     Tel.No     |
--------------------------------------------------
34          John            20                 MO                  123
45          Will              20                 SS                    456
-------------------------------------------------


-->I'm just new in axapta developement and I hope u guys can help me because
the   
      problem is more complicated than this

Thanx in advanced








Yahoo! Groups Links









Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to