Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Combining Coponents to Create Business Letters. - Why &VAR.EVAL does not work ?????

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Combining Coponents to Create Business Letters. - Why &VAR.EVAL does not work ?????
 Login/Join
 
Member
posted
Hi,
I have to create business letters using a combination of Headers/Letter Body/Letter Gif ( BitMaps). Let us say I have 5 headers {1h,2h,....5h} , 2 Letter Bodies {1b,2b}, 5 gifs {1g,2g,3g...}
Depending on User Input I want to choose a component from each of the 3 categories and put together a letter.

=================== This Code works Start>
SET PAGE-NUM = OFF
TABLE FILE CAR
PRINT CAR NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT PDF
ON TABLE SUBHEAD
-INCLUDE h1
HEADING
-INCLUDE b1
ON TABLE SET STYLE *
DEFMACRO=HDG, JUSTIFY=CENTER, SIZE=11, FONT=ARIAL, $
DEFMACRO=H1, STYLE=BOLD, $
DEFMACRO=CONT, JUSTIFY=LEFT, SIZE=11, FONT=ARIAL, $
DEFMACRO=I1, IMAGE=IMAGE1.gif,POSITION=(4.5 10),SIZE=(2.66 .77),UNITS=INCHES,$
TYPE=REPORT,SQUEEZE=ON,GRID=OFF,LEFTMARGIN=1,RIGHTMARGIN=0.5,BOTTOMMARGIN=0.2,$
TYPE=TABHEADING, MACRO=HDG, $
TYPE=TABHEADING, LINE=1, MACRO=H1, $
TYPE=HEADING, MACRO=CONT, $
TYPE=REPORT, MACRO=I1, $
END
-EXIT
=================== This Code Works End <

When I convert this into a parameterized code ( right now only for choosing the Header) The code does not work.
All I am doing is to parameterize the value so that later on, I can pass external parameters and change H1 to H2 so on and so forth.

=================== This Code DOES NOT work !!! Start>
-SET HCMD = '-INCLUDE H1'
SET PAGE-NUM = OFF
TABLE FILE CAR
PRINT CAR NOPRINT
WHERE RECORDLIMIT EQ 1
ON TABLE PCHOLD FORMAT PDF
ON TABLE SUBHEAD
&HCMD.EVAL
HEADING
-INCLUDE b1
ON TABLE SET STYLE *
DEFMACRO=HDG, JUSTIFY=CENTER, SIZE=11, FONT=ARIAL, $
DEFMACRO=H1, STYLE=BOLD, $
DEFMACRO=CONT, JUSTIFY=LEFT, SIZE=11, FONT=ARIAL, $
DEFMACRO=I1, IMAGE=IMAGE1.gif,POSITION=(4.5 10),SIZE=(2.66 .77),UNITS=INCHES,$
TYPE=REPORT,SQUEEZE=ON,GRID=OFF,LEFTMARGIN=1,RIGHTMARGIN=0.5,BOTTOMMARGIN=0.2,$
TYPE=TABHEADING, MACRO=HDG, $
TYPE=TABHEADING, LINE=1, MACRO=H1, $
TYPE=HEADING, MACRO=CONT, $
TYPE=REPORT, MACRO=I1, $
END
-EXIT
===================This Code DOES NOT work !!! End <


Can anyone help me ?
Thanks,
SauPa


Saurabh Palkar
 
Posts: 18 | Registered: April 20, 2007Report This Post
Virtuoso
posted Hide Post
I wonder if using only subheads and adding a WHEN option would help some. Of course I haven't done much with adding bit maps and so on to reports, have had to get really creative for subfoots using WHEN however.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
quote:
This Code DOES NOT work


Would be nice to know what doesn't work. I copied your code, created a fex called h1.fex and another called b1.fex and changed the image file name and it worked for me.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Basically, the H1 (Heading 1 Component) is missing from the output PDF after using the &HCMD.EVAL
Also an error is thrown...
(FOC227) THE FOCEXEC PROCEDURE CANNOT BE FOUND: h1
ERROR AT OR NEAR LINE 9


Saurabh Palkar
 
Posts: 18 | Registered: April 20, 2007Report This Post
Virtuoso
posted Hide Post
First of all, in your -SET it should be
-SET &HCMD='-INCLUDE H1' ;
include the & and the semicolon at the end
If that doesn't solve the problem, instead of parameterizing the whole line, try parameterizing only the h1 part:
-SET &HCMD='H1';
and -INCLUDE &HCMD


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Like I said, the code works for me. The header fexes are successfully included and appear on the report. So does the image.

If you're on a UNIX machine, ensure you -INCLUDE UPPERCASE fexes and ensure that the file name is lowercase.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
I had not placed the Include Fexes in the application path.
Now both the fexes run.
I moved the fexes in the application path.

Thanks for all the comments.
Appreciate all your help.
Saurabh


Saurabh Palkar
 
Posts: 18 | Registered: April 20, 2007Report This Post
Expert
posted Hide Post
I have had trouble with
-INCLUDE &PARMNAME
although, as Darin says, we would want that to work, but i don't think it does.
however
-SET &HMCD = '-INCLUDE SOMETHING' ;
and then
&HMCD.EVAL for me does work, as Francis says;
Make sure your H1 file does in fact exist, and is FILEDEF'd; Your fex error shows that your fex can't find that file, so perhaps it isn't FILEDEF'd ; Make sure the H1 file does contain character strings surrounded by " "




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Combining Coponents to Create Business Letters. - Why &VAR.EVAL does not work ?????

Copyright © 1996-2020 Information Builders