I'm trying to send critieria to reporter so it gathers the appropriate record with a concatenated key. eg. within reporter the criteria can read 'WITH @ID=1*5"'. However this same criteria will return
Error in script
Invalid words: WITH'
Critieria will not be saved containing errors.. then subsequent illegal operation crash in Reporter.
I could split the key up and call it individually, but this is inefficient and non-standard. The guts of our generic print routine is as follows:
COMMAND=REPORTER.EXE'COMMAND := ' /AP=:@DBIDCOMMAND := ' /UN=:@USERNAMECOMMAND := ' /RP=:LAYOUTCOMMAND := ' /SEL=:CRITERIACOMMAND := ' /SELTYPE=revelationbasic'COMMAND := ' /RE=1' ;* load report from reposIF SOURCE THENLB_STATUS_LINE('Preparing to Print: ':FORM.DISPLAY:' Layout ':FORMAT,1)COMMAND := ' /PR=1' ;* bypass design and printDO.NOT.DISPLAY.DIALOG=XLATE('SPK_DEFAULTS','SETTINGS',70,'X')IF DO.NOT.DISPLAY.DIALOG THENCOMMAND := ' /BA=1' ;* do not show print dialog boxENDEND ELSELB_STATUS_LINE('Preparing to Preview: ':FORM.DISPLAY:' Layout ':FORMAT,1)COMMAND := ' /PV=1' ;* bypass design and previewENDCOMMAND := ' /QU' ;* quit after printORIG=SET_PROPERTY('SYSTEM','BLOCK_EVENTS',1)CALL UTILITY('RUNWIN',COMMAND,'')BACK=SET_PROPERTY('SYSTEM','BLOCK_EVENTS',ORIG)
Glen,
I would use GETLIST in the Report. Select your keys using an RLIST statement in your subroutine first, then call the report which will get the list of stored keys.
I found this to be the most reliable way of selecting data from a table for report purposes.
In addition to what Dave said, you can find this documented in the knoledge base.
Printing Single or Multiple Records in Reporter
Tracy