June 16, 2014, 03:35 PM
subbu [CLOSED] document composer passing parameters
hello team,
I have two fex files one is having code which I took from the doucment composer and the other is the report fex data/code.
File1 code:
-SET &CARS='JAGUAR';
-* File Doc_Com
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^1', MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=A4, $
PAGELAYOUT=1, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=0, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, ORIENTATION=LANDSCAPE, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,ORIENTATION=LANDSCAPE,', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.875 0.167), DIMENSION=(11.250 2.915), METADATA='Z-INDEX: 100; LEFT: 0.875in; OVERFLOW: auto; WIDTH: 11.25in; POSITION: absolute; TOP: 0.167in; HEIGHT: 2.915in', $
COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(0.885 2.354), DIMENSION=(11.250 4.169), METADATA='Z-INDEX: 101; LEFT: 0.885in; OVERFLOW: auto; WIDTH: 11.25in; POSITION: absolute; TOP: 2.354in; HEIGHT: 4.169in', $
END
SET COMPONENT='report1'
-*component_type report
-INCLUDE rxconred/app/vijayatest.fex
SET COMPONENT='report2'
-*component_type report
-INCLUDE rxconred/app/vijayatest.fex
COMPOUND END
File2 Code:
TABLE FILE CAR
SUM DEALER_COST
BY CAR
WHERE CAR EQ '&CARS'
ON TABLE PCHOLD FORMAT PDF
END What am looking here is the variable &CARS am passing a value lets say "JAGUAR" to its reports called vijayatest.fex. So, here the same fex has been called couple of times in my File 1 code. I'm trying to pass a value which will filter the data and open a PDF compound report. but am not getting a PDF ouput am getting the following message
0 NUMBER OF RECORDS IN TABLE= 2 LINES= 1
Please let me know the way am passing webfocus variable values or parameters to its compound reports are correct or not
This message has been edited. Last edited by: <Kathryn Henning>, June 24, 2014 10:38 AM June 17, 2014, 12:56 AM
Ram Prasad E Share the code of vijayatest.fex procedure.
June 17, 2014, 02:51 AM
subbu Sorry! the file2 code nothing but,
TABLE FILE CAR
SUM DEALER_COST
BY CAR
WHERE CAR EQ '&CARS'
ON TABLE PCHOLD FORMAT PDF
END
June 17, 2014, 07:25 AM
Anatess This works just fine for me.
But... does that -SET &CARS statement in your code have a space before it? It shouldn't.
In any case, to determine what's going on in your code set &ECHO to ALL or something that will display error codes. Then you'll know what's going on.
June 17, 2014, 09:34 PM
StuBouyer Make sure that your included FEXes do NOT have a -EXIT in them.
This will be included in the compund document and cause it to stop.
Also try changing the included FEX to format HTML and see if that makes a difference
Cheers
Stu