Lookup for specific field in request form in Report.

bhagyeshbhagyesh Member Posts: 29
Hello All,
Can someone tell me How to get a lookup in a request form of a report for perticular Field??
* Here the desired field has its Table Relation Property Undefined.. Thn how can i get lookup at run time in a report.

Replies will be appreciated..!! :)

Comments

  • fverkelfverkel Member Posts: 66
    Set the property TableRelation of the control in the RequestForm.
    If needed you can also specify an alternative LookupFormID.
    Keep It Simple and Stupid (KISS), but never oversimplify.
  • bhagyeshbhagyesh Member Posts: 29
    I'M talking about the request form of report on which fields enterd in RequireFilterfields are displayed for filtering at the time of running the report.
  • kapamaroukapamarou Member Posts: 1,152
    You can do that only on the request form.

    If you tell us exactly what you want to filter on, then we could propose a workaround.
  • Cem_KaraerCem_Karaer Member Posts: 281
    First of all, what do you mean by request form? Is there any option tab of the report? If there is any option tab, is there any controls on the options tab of the report? Or do you mean only the dataitem tab of the report?
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • DenSterDenSter Member Posts: 8,304
    You can't change the lookup behavior on the dataitem tabs of a report's request form. The report object looks at the table relationship that is set in the table design for that.
  • bhagyeshbhagyesh Member Posts: 29
    M not talking about the Request Form which contains the Option Tab..Its the Dataitem tab of the report.
    I m talking about the form in which we entered the fields by setting tht specific fields in the ReqFilterFields property of a Dataitem..
    Now I need a lookup in a fields which hav its table relation in its property As <Undefined> in a table..
    Hope Now u all get my Question...
    Plz Reply if its possible hav a lookup overthr???? :roll:
  • Cem_KaraerCem_Karaer Member Posts: 281
    There is no way to create a lookup button for a field that has no tablerelation in a report (although there is a way for forms). If you really want a lookup but no tablerelation validation, you can set the tablerelation property of the field and ValidateTableRelation = No
    Hope it helps!
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • fverkelfverkel Member Posts: 66
    But there are workarounds.

    1. You could make a variable and put it in the RequestForm in the Option tab, using property TableRelation.
    Then use this variable to filter on your existing field.

    2. You could add a field to the table, a flowfilter with a TableRelation. And then use C/AL code in the report to place a filter on the existing field.

    3. You could make an extra data-item in the report.
    I.e. if you wanted a lookup to the table Country, then you could add a data-item Country. Then the user could place a filter (with lookup) on field Code.
    Here you could go two ways.
    a. With C/AL code you could get this filter and apply it to your field.
    And of course CurrReport.BREAK in the trigger OnPreDataItem Country.
    or
    b. Link the existing data-item(s) to the data-item Country.
    Keep It Simple and Stupid (KISS), but never oversimplify.
Sign In or Register to comment.