Re: 4gl report output options - email
Posted in 1996
> > Hi - > > We have a number of 4gl report prgs which request the user's choice of > output: screen, printer, and some offer email. > > The problem is that the email option sends the same lovely formatted > version that would be printed, with spacing, titles, etc. What we > often prefer is to just dump the output (unload style, .csv) to a > file, and then mail that file so the user can do whatever with another > tool. > > How does one best accomplish this? run a different report: CASE output_opt WHEN 'S' START REPORT foo WHEN 'P' START REPORT foo TO PRINTER WHEN 'E' START REPORT foo2 TO PIPE | "mailx -s ........" ....... FOREACH.......... IF output_opt = 'E' THEN OUTPUT TO REPORT foo2(record.*) ELSE OUTPUT TO REPORT foo(record.*) END IF END FOREACH IF output_opt = 'E' THEN FINISH REPORT foo2 ELSE FINISH REPORT foo END IF Alternatively you can pass a switch to the report proc itself and test that switch before you print everything - i think this (above) way is cleaner. cheers j. ________________________________________________________________________ Jack Parker - Hewlett Packard, DMD/IS Boise, Idaho, USA jparker@boi.hp.com Currently on loan to PLD/PE ________________________________________________________________________ Outside of a dog a book is a man's best friend. Inside of a dog it's too dark to read. (Groucho Marx) ________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. ________________________________________________________________________