home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!isgate!krafla!gaukur
- From: gaukur@rhi.hi.is (Kristjan Gaukur Kristjansson)
- Newsgroups: comp.databases.informix
- Subject: Re: reports in 'if then' clauses (was: defer interupt)
- Message-ID: <5613@krafla.rhi.hi.is>
- Date: 16 Nov 92 10:19:38 GMT
- References: <1e0gm2INNppc@emory.mathcs.emory.edu>
- Sender: usenet@rhi.hi.is
- Lines: 39
- Nntp-Posting-Host: dyngja
-
- In <1e0gm2INNppc@emory.mathcs.emory.edu> jerry@jerry.mendota.ingr.com (Jerry Jugovich) writes:
-
- >-> I still also would like to know why I can't put the output section in a
- >-> IF THEN clause. If I could do that then those other duplicate reports
- >-> could be nuked. So because of the report functionality of I4gl I must create
- >-> and maintain at least two times the number of reports required.
- >->
-
- Here is a case clause with 'different' calls to a report. "when H" and "when S"
- send the same data ordered on different columns, but I got duplicate reports
- anyways since I'm also having the third choice of "when L", but the point
- being that 'if then' clauses (and 'case' clauses) can be used.
-
- case
- when svar = "L" start report n_llisti to nafn_lista
- when svar matches "[HS]" start report n_hlisti to nafn_lista
- end case
- display "" at 1,1
- display "N· er Θg a≡ skrifa sveitarfΘlagalistann..." at 1,1 attribute(reverse)
- foreach b_sveitir into r_sveitir.*
- case svar
- when "L" output to report n_llisti(r_sveitir.*)
- when "H" call islnafn(r_sveitir.hreppur) returning r_sveitir.nafn1
- call islnafn(r_sveitir.sveitarfelag) returning r_sveitir.nafn2
- output to report n_hlisti(r_sveitir.*)
- when "S" call islnafn(r_sveitir.hreppur) returning r_sveitir.nafn2
- call islnafn(r_sveitir.sveitarfelag) returning r_sveitir.nafn1
- output to report n_hlisti(r_sveitir.*)
- end case
- let fjoldi = fjoldi + 1
- end foreach
- message "Fj÷ldi φ ·rtaki = ", fjoldi
- close b_sveitir free b_sveitir
- case
- when svar = "L" finish report n_llisti
- when svar matches "[HS]" finish report n_hlisti
- end case
-
- Gaukur.
-