filter multiline & display

justeryujusteryu Member Posts: 13
hello guys ,
Can anybody help me with this ?
I have a subform and source table :
field1 field2 field3
A001 0 B01
A001 10000 B01
A001 20000 B02

the primaryKey : [ field1,field2 ]

On mainform,the subform want to display
A001 B01
A001 B02

what should i do to solve this?
Appreciate anyone who can help me!

JY

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    justeryu wrote:

    what should i do to solve this?

    Solve what? You talk about the subform without any details of the main form. What are you trying to achieve?
    David Singleton
  • justeryujusteryu Member Posts: 13
    justeryu wrote:

    what should i do to solve this?

    Solve what? You talk about the subform without any details of the main form. What are you trying to achieve?

    Hello David , thank you so much.
    The source table of mainform also have field1.
    For example ,the source table of subform like this
    PS:(field1,No.1),(field2,Line No.),(field3,No.2)
    field1 field2 field3
    A001 0 B01
    A001 10000 B01
    A001 20000 B02
    When mainform OnAfterGetRecord(field1,Value=A001),subform would display like this
    A001 B01
    A001 B02

    What i mean to say was lines of subform
    field1 field3
    A001 B01
    A001 B01
    Only display a line
    field1 field3
    A001 B01

    BestRegards,
    JY
  • David_SingletonDavid_Singleton Member Posts: 5,479
    What ... Are ... You ... Trying ... To ... Do ... ???????
    David Singleton
  • rdebathrdebath Member Posts: 383
    justeryu wrote:
    field1 field3
    A001 B01
    A001 B01
    Only display a line
    field1 field3
    A001 B01
    You mean they want the subform to do an SQL "GROUP BY".

    Errm, shoot the consultant? ](*,)

    You can't do that directly in NAV, I suppose the easiest way to fake it would be to use a temp table and run the subform on that.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    rdebath wrote:

    Errm, shoot the consultant? ](*,)

    My guess though is that in this case that would be suicide :mrgreen:
    David Singleton
Sign In or Register to comment.