Focal Point
[CLOSED] document composer passing parameters

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9007022176

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 17, 2014, 12:56 AM
Ram Prasad E
Share the code of vijayatest.fex procedure.


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
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 




WebFOCUS 7.6.10
Windows
Output: Excel,PDF
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.


WF 8.1.05 Windows
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


WebFOCUS 8.2.03 (8.2.06 in testing)