Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

Collection Code Members Members Owner ID Owner ID
Procedure Directory PROC-DIR
1:1-1

Title : Categories

Toolbars

call newcollection()
call insertmember()
call members()
call BrowseFilter()
call CreateSheet()
call PrintGrid()
call BrowseFilter()
call PrintGrid()
call CreateSheet()
call CloseForm(False)

Buttons

Fields


 (.AU_RELAT_D)
 (.AU_RELAT_C)
 (.CNT)
 (.CNT)
 (.ID1)
 (.ID1)
 (.AU_RELAT_D)
 (.AU_RELAT_C)
 (.CNT)
 (.CNT)
 (.ID1)
 (.ID1)


AutoScript

lib

proc Form_Start()

     f = TopForm()
     p = PByName(f,"DATA")

     call SetCaption("Owned Collections")

end

proc Lst_DblClick()

     call OpenFormTop("ptEdit";"AU_RELAT_E.FM";"WORK.AU_RELAT";1;"?=AU_RELAT")

end

proc Panels_Start()

     mode = __params[4]
     if (mode = "ALL_MODE") then
        start_sql "DATA" "KOSMOS"
         SELECT AU_RELAT.AU_RELAT, AU_RELAT.AU_RELAT_D, AU_RELAT.AU_RELAT_C,
         AU_RELAT.TNAME1, AU_RELAT.TNAME2, AU_RELAT_ITM.ID1,
         Count(AU_RELAT_ITM.AU_RELAT_ITM) AS CNT
         FROM AU_RELAT LEFT JOIN AU_RELAT_ITM ON AU_RELAT.AU_RELAT = AU_RELAT_ITM.AU_RELAT
         GROUP BY AU_RELAT.AU_RELAT, AU_RELAT.AU_RELAT_D, AU_RELAT.AU_RELAT_C,
         AU_RELAT.TNAME1, AU_RELAT.TNAME2, AU_RELAT_ITM.ID1
        end_sql
        q = QueryByName("DATA")
     endif
     if (mode = "REC_MODE") then
        start_sql "DATA" "KOSMOS"
         SELECT AU_RELAT.AU_RELAT, AU_RELAT.AU_RELAT_D, AU_RELAT.AU_RELAT_C,
         AU_RELAT.TNAME1, AU_RELAT.TNAME2
         FROM AU_RELAT
         WHERE (AU_RELAT.TNAME1=:T)
        end_sql
        q = QueryByName("DATA")
        call TSetParam(q,"T",__params[5])
     endif
     call TPrepare(q)

end

proc newcollection()

     call OpenFormTop("ptAppend";"AU_RELAT_E.FM";"WORK.AU_RELAT";1;"?=AU_RELAT")

end

proc insertmember()

     rel_id = TGetFld(q,"AU_RELAT")
     rel_d = TGetFld(q,"AU_RELAT_D")
     rel_c = TGetFld(q,"AU_RELAT_C")
     rel_t1 = TGetFld(q,"TNAME1")
     rel_t2 = TGetFld(q,"TNAME2")
     id1 = __params[6]

     call AddCollectionMember ( rel_id, rel_d, rel_c, rel_t1, rel_t2, id1)
     call RefreshActiveRow(f,p)

end

proc members()

     rel_t1 = TGetFld(q,"TNAME1")
     id1 = __params[6]
{ if (id1 > 0) then }
  {      call CreateNestZones("TYPE=BRICK;CNT=1;PAGERS1=1;HEIGHT1=50")  }
  {      call OnOpenForm_NestPager("ZONE_FIRSTEMTPY")         }
        call OpenFormTop("ptBrowse","AU_COLLECTIONMEMBER_B.FM","QRY.DATA","MEMBER_MODE",rel_t1,id1)
  {   endif   }
end