Re: Report Question
Posted in 1998
This is a multi-part message in MIME format. --------------47B0512E60 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bryan Sapot wrote: > > Can you call a FUNCTION from in side a REPORT. > > Some thing like this > > REPORT thisreport() > > ON EVERY ROW > PRINT "something" > CALL thisfunc() > > END REPORT > > FUNCTION thisfunc() > PRINT "something else" > > END FUNCTION > > I have a lot of repeated code in the report that could be moved to a > function. I assume you are using 4GL not isql. It works for me. See the attached sample program. Art S. Kagel --------------47B0512E60 Content-Type: text/plain; charset=us-ascii; name="test.4gl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test.4gl" main start report tester to pipe "pg" output to report tester( 1, 2, 3 ) output to report tester( 5, 6, 7 ) finish report tester end main function avalue ( a ) define a integer return (a + 1) end function report tester (c, d, e ) define b, c, d, e integer format on every row let b = avalue (e ) print "c=",c,", d=",d,", e=",e,", b=",b end report --------------47B0512E60--