Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!ncrlnk!ncrcae!scottj From: scottj@ncrcae.Columbia.NCR.COM (L. Scott Johnson) Newsgroups: comp.databases Subject: Re: sqlforms: creating display-only blocks Message-ID: <5059@ncrcae.Columbia.NCR.COM> Date: 12 Sep 89 19:53:56 GMT References: <4245@yarra.oz.au> Reply-To: scottj@ncrcae.Columbia.NCR.COM (L. Scott Johnson) Organization: NCR Corp., Engineering & Manufacturing - Columbia, SC Lines: 49 In article <4245@yarra.oz.au> cm@yarra.oz.au (Charles Meo) writes: >To all Oracle forms gurus: >I am currently working on a product admin system for a client, and while >the definition of forms for database tables is not much of a problem, I'm >damned if I can see how to do a simple thing like create a nice header >containing just the current username and the date up the top. > I spent two weeks on this hurdle, and all I could come up with is the following kludge-fix: Block: DUMB Seq: LAST Base Table: DUAL Display in menu:NO Field #1: U_NAME CHAR, NON_DATABASE, DISPLAYED, NON_ENTERABLE Field #2: U_DATE CHAR, NON_DATABASE, DISPLAYED, NON_ENTERABLE Field #3: DUMMY CHAR, DATABASE, DISPLAYED, ENTERABLE KEY-STARTUP for form: #EXEMACRO GOBLK DUMB; EXEQRY; select user, to_char(sysdate,'format') into dumb.u_name, dumb.u_date from dual #EXEMACRO GOBLK ; And alter your KEY-NXTBLK and KEY-PRVBLK to skip DUMB. Of course, you'll end up with an X (DUMMY) somewhere in the form. You can either move it to its own page or hide it 'mongst your graphics. Additionally, you'd be safer if you altered the KEY-COMMIT to first do a CLRBLK on DUMB. ---------- L. Scott scottj@ncrcae.Columbia.NCR.COM