How about first some query questions written in basic regarding the options
available, and then followed by an internal building of the headings so left
parts are left justified, center parts are center justified, right parts are
right justified, and then building query statement within the program and
PERFORM'ing that?
This is what I do for a MvBASE client and the results are really nice.
Multiple options selected can be included as part of the headings, and it's
easy as pie since I have variables that I just plop in the options selected
and the programming does the auto-justification!
This way I can do things normally only 'doable' in a program, but still let
the query language do all the reporting work. Headings come out perfectly
every time and the first time with no guessing. Different options selected
which in a proc would throw the headings off, still come out perfect.
SETUP.HEADINGS:
RPT.HDNG = 'Report Title Goes Here'
RPT.HDNG<2> = OPTION.TEXT
LINE.SIZE = 132
COMPANY = 'Client Name Goes Here'
*#* GENERIC HEADINGS DO NOT MODIFY THIS CODE
*
IF NOT(MOD(LEN(COMPANY),2)) THEN COMPANY = ' ':COMPANY
HALF.SIZE = INT(LINE.SIZE/2)
OPEN '', 'SYSTEM' TO SYSTEM ELSE STOP CANNOT OPEN SYSTEM FILE
LOGON = SYSTEM(19)
PORT = SYSTEM(18)
READ SYS.REC FROM SYSTEM, LOGON ELSE SYS.REC = ''
IF SYS.REC<1> = 'D' THEN
LOGON.ACCOUNT = LOGON
END ELSE
LOGON.ACCOUNT = SYS.REC<2>
END
*
IDATE = DATE()
TEMP = OCONV(IDATE,'DWA')
DAY = TEMP[1,1]:OCONV(TEMP[2,10],'MCL')
TIME = OCONV(TIME(),'MTH')
DATE = OCONV(IDATE,'D2/')
*
SEC.1 = PGM.NAME:' ':TIME
SEC.2 = COMPANY
SEC.3 = 'Port ':PORT:' Acct ':LOGON.ACCOUNT[40]:' Page'
L2SC1 = DAY:' ':DATE
*
SEC.1.LEN = LEN(SEC.1)
SEC.2.LEN = INT(LEN(SEC.2)/2)
SEC.3.LEN = LEN(SEC.3)+5 ; *Add five digits to account for space & page #
at eol
*
L2SC1.LEN = LEN(L2SC1)
RPT1H.LEN = INT(LEN(RPT.HDNG<1>)/2)
*
HDNG.1 = ''
HDNG.1[1,SEC.1.LEN] = SEC.1
HDNG.1[HALF.SIZE - SEC.2.LEN] = SEC.2
HDNG.1[LINE.SIZE - SEC.3.LEN] = SEC.3
*
HDNG.1 = HDNG.1[1,LINE.SIZE-5]
*
HDNG.2 = ''
HDNG.2[1,L2SC1.LEN] = L2SC1
HDNG.2[HALF.SIZE - RPT1H.LEN] = RPT.HDNG<1>
*
HDNG.3 = SPACE(HALF.SIZE-LEN(RPT.HDNG<2>)/2):RPT.HDNG<2>
HDNG.4 = SPACE(HALF.SIZE-LEN(RPT.HDNG<3>)/2):RPT.HDNG<3>
HDNG.5 = SPACE(HALF.SIZE-LEN(RPT.HDNG<4>)/2):RPT.HDNG<4>
PAGE.CNT = 0
LINE.CNT = 99
*
*#* END OF GENERIC HEADINGS
*
* Now make what would normally be headings in a program, into PICK
headings
HDNG.1 := "'":'PL':"'"
HDNG.2 := "'":'L':"'"
HDNG.3 := "'":'L':"'"
HEADINGS = HDNG.1:HDNG.2:HDNG.3
RETURN
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of MAJ Programming
Sent: Monday, March 12, 2007 06:33
To: [email protected]
Subject: Re: [U2] Reports In Universe BASIC
Can't wait for the answers on this one.
My submissions are:
1. External SSELECT then report formatting in Basic.
2. Parameters gathered in BASIC then report formatting in Basic.
3. Parameters gathered in BASIC then create an EXECUTEable TCL statement for
the report.
This thread should get interesting. Refer to last week's Anita and Marinko's
newbie requests and this falls directly into it.
My side bet is going to be how differently BREAK-ON's are handled with
Basic. Also, the inclusion of secondary files, simultaneous report sections
etc. This could get ugly.
My 1 cent
Mark Johnson
----- Original Message -----
From: "Sanjeebkumar Sarangi" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, March 12, 2007 7:00 AM
Subject: [U2] Reports In Universe BASIC
> Hi
>
> What type of report is generated in Universe Basic ?
> Can any one tell me how to write a program that will generate a report ?
> Please give me some example that will provide me a clear idea regarding
> reports generation in Universe Basic.
>
> Sanjeeb
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/