Re: ACE Report Question w/ Param passing
Answered: amber (solid confidence) — Message quotes the full original ACE $variable parameter-substitution question and offers a workable alternative approach (drive the report from 4GL with a DECLARE CURSOR) rather than a direct fix for the ACE limitation itself; not confirmed by the asker.
Advisory only.
Posted in 1995
} Subject: ACE Report Question w/ Param passing } Date: 10 Jan 1995 20:00:18 GMT } Reply-To: Charles Serfoss <vecmor@rahul.net> } Organization: a2i network } } I'm trying to put together a "general" report which will accept a field } name as a passed parameter. Here's the appropriate bits of code... } } define } param[1] p_variable char(15) } param[2] p_value char(15) } end } } select } ... } where } $p_variable = $p_value } end } } I can get it to work with just passing $p_value and explicitly naming the } field instead of using $p_variable, and it compiles with the above } coding, but for some reason -- It's doesn't give me the correct output. } I end up getting nothing as output. } } The reason for this is that I need to extract a series (20-30) of related } information from different fields and I don't want to have to write 20-30 } ace reports. If I can put the whole thing in a script, great. } } If necessary, I can use sed to insert the variable name directly into the } ace report, but that's another level of complexity I'd like to avoid. } } Any suggestions??? } } Thanks, } } Charles Serfoss } NOVA Private Industry Council } -- } Charles Serfoss <vecmor@rahul.net> I see that you reference ACE. Is using 4GL an option? If so, you could use a character variable to contain your SELECT statement, substitute the field name as appropriate, then DECLARE a cursor for the statement, and use the cursor to retrieve data to be passed to the REPORT module. It's about as complex as using sed, but once it is written, compiled, and tested, then everything is encapulated. Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, SLS | / \\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\