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     Dynamic values passed to Stylesheet

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Dynamic values passed to Stylesheet
 Login/Join
 
Guru
posted
We have to iterate some images in a report based on activity quarter so that the calendar months .gifs appear in the heading of a PDF report. (There is a page-break on quarter.) For example, the following decode correctly designates the .gif name

MONTH_1_GIF/A10 = DECODE QTR_MON1(
'200607' '200607.gif'
'200608' '200608.gif'
'200609' '200609.gif'
'200610' '200610.gif'
'200611' '200611.gif'
'200612' '200612.gif'
ELSE ' ');

Currently our stylesheet has static values.

TYPE=REPORT,
IMAGE=200609.gif,
POSITION=(0.250000 0.500000),
$
TYPE=REPORT,
IMAGE=200610.gif,
POSITION=(3.000000 0.500000),
$
TYPE=REPORT,
IMAGE=200611.gif,
POSITION=(6.000000 0.500000),
$
TYPE=REPORT,
IMAGE=200612_next.gif,
POSITION=(9.000000 0.500000),
$


The question:

Is the stylesheet static or can these decoded values, e.g. MONTH_1_GIF, be passed to the stylesheet?

Assuming the latter, what is the right combination of quote marks, ampersands, etc., so that the stylesheet designates the correct .gif file?

As usual – thanks in advance for all of your professionalism, enthusiasm and regard for humanity! (At least WebFOCUS humanity)
Smiler


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
 
Posts: 238 | Location: Atlanta, GA/Rehovot, Israel | Registered: May 06, 2003Report This Post
Expert
posted Hide Post
The syntax to add an image to an HTML report allows you to refer to a column instead of a URL. The column contains the URL. Therefore, the DEFINE field has to be mentioned in the report request (with a NOPRINT) and the Stylesheet entry would refer to this column.

From the manual:
TYPE={REPORT|heading}, IMAGE={url|(column)} [,IMAGEALIGN=position]     [,IMAGEBREAK={ON|OFF}] [,ALT='description'], $


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
Expert
posted Hide Post
This is an example in the documentation:

Using a File Name in a Data Source Field in an HTML Report
SET BASEURL=http://ibi/apps/session/gifs/
DEFINE FILE CAR
FLAG/A12=DECODE COUNTRY ( 'ENGLAND' 'uk' 'ITALY' 'italy'   'FRANCE' 'france' 'JAPAN' 'japan' );
END
TABLE FILE CAR
PRINT FLAG NOPRINT 
AND MODEL AS '' 
BY COUNTRY NOPRINT AS '' 
BY CAR AS ''
WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE' OR 'ITALY' OR 'JAPAN'
ON COUNTRY SUBHEAD
"<+0>Cars produced in <ST.COUNTRY"
HEADING CENTER
"Car Manufacturer Report"
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=SUBHEAD, IMAGE=(FLAG), $
TYPE=REPORT, GRID=OFF, $
TYPE=HEADING, SIZE=12, STYLE=BOLD, $
TYPE=SUBHEAD, STYLE=BOLD, $
ENDSTYLE
END


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
Expert
posted Hide Post
Here is a working example for HTML and PDF.

The BASEURL is only used for HTML reports. For PDF reports, the images must be in the App Path.

The size and position tags only work for PDF. The size and position in HTML would have to be manipulated in some other way.

To see the PDF version, simply un-comment the -*ON TABLE PCHOLD FORMAT PDF line.

SET BASEURL='http://localhost:8080/approot/demo/'
-RUN

DEFINE FILE CAR
FLAG/A20= IF COUNTRY EQ 'W GERMANY' THEN 'GERMANY_FLAG.jpg' ELSE COUNTRY || '_FLAG.jpg';
END
-RUN

TABLE FILE CAR
PRINT 
FLAG NOPRINT 
MODEL AS '' 
BY COUNTRY NOPRINT AS '' 
BY CAR AS ''
ON COUNTRY SUBHEAD
"<+0>Cars produced in <ST.COUNTRY"
HEADING CENTER
"Car Manufacturer Report"
" "
-*ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=SUBHEAD, IMAGE=(FLAG), SIZE=(0.3 0.2), POSITION=(4.0 0.0), $
TYPE=REPORT, GRID=OFF, $
TYPE=HEADING, SIZE=12, STYLE=BOLD, $
TYPE=SUBHEAD, STYLE=BOLD, $
ENDSTYLE
END
-RUN


The images are here:






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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Dynamic values passed to Stylesheet

Copyright © 1996-2020 Information Builders