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.
I'm creating a report that displays student details (school,name,id, etc.), and I've been asked to display the students photo.
Student data is in Oracle, photographs are stored on a network drive as student_id.jpg (123.jpg, 987.jpg).
I've reviewed the on-line help "Adding an Image to a Report." My needs closely match the example about using a BLOB field in a Report column. I differ, obviously, on using files not fields.
Any insight on how to adapt that example, or pointing me in the right direction is greatly appreciated.
Thanks.This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.11 Developer Studio on Windows XP. Server Components running on Windows Server 2003. Excel, HTML, PDF
What is the column reference, I've seen N3's and P4's used in other examples. What do those values mean? I've tried searching for documentation but haven't found the right search terms to self-educate.
Question 2:
DEFINE FILE CAR
LOGO/A15=IF COUNTRY EQ 'ENGLAND' THEN 'IMAGE1' ELSE
IF COUNTRY EQ 'ITALY' THEN 'IMAGE2' ELSE 'IMAGE3';
END
Should I include the full file path to the student images as part of the LOGO compute? Or as part of the TYPE=DATA?
My current code is:
TABLE FILE DTBL_STUDENTS
PRINT
COMPUTE STUDENT_IMG/A100V = 'J:\photos\' || DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_ID || '.JPG';
'DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_NAME'
'DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_CURRENT_GRADE_CODE'
BY 'DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_ID'
HEADING
""
FOOTING
""
WHERE DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_ID EQ '1227731' OR '723252' OR '1226906';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=DATA,COLUMN=C5,
IMAGE=(STUDENT_IMG),
SIZE=(2.000000 5.000000),
Produces the following:
STUDENT_ID STUDENT_IMG STUDENT_NAME STUDENT_CURRENT_GRADE_CODE
1226906 J:\photos\1226906.JPG Student Name 09
1227731 J:\photos\1227731.JPG Student Name 09
723252 J:\photos\723252.JPG Student Name 12
No photos, no error messages.
Thanks again for looking!This message has been edited. Last edited by: redapple,
WebFOCUS 7.6.11 Developer Studio on Windows XP. Server Components running on Windows Server 2003. Excel, HTML, PDF
N - The column number from the left. B - The By field column number P - The column number from the left Not including NOPRINTS.
Question 2. For HTML you need a web location to the images, for PDF the images need to be in the path. so WebFOCUS can attach the image (Include) to the PDF document.
-* File fmtest1.fex
DEFINE FILE CAR
COUNTRYX/A10 = IF COUNTRY EQ 'W GERMANY' THEN 'GERMANY' ELSE COUNTRY;
FLAG_IMG/A40 = LOCASE(10, COUNTRYX, 'A10') || '_flag_s';
END
TABLE FILE CAR
SUM
COUNTRY
SALES
FLAG_IMG NOPRINT
BY COUNTRY AS ''
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8,
BORDER=1, BORDER-COLOR=SILVER,
$
TYPE=DATA, COLUMN=COUNTRY(1), IMAGE=(FLAG_IMG), $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END
HTML example:
-* File fmtest2.fex
DEFINE FILE CAR
COUNTRYX/A10 = IF COUNTRY EQ 'W GERMANY' THEN 'GERMANY' ELSE COUNTRY;
FLAG_IMG/A40 = LOCASE(10, COUNTRYX, 'A10') || '_flag_s';
END
TABLE FILE CAR
SUM
COMPUTE FLAG/A100 = '<img src="/approot/baseapp/' || FLAG_IMG || '.gif" />'; AS ''
COUNTRY
SALES
FLAG_IMG NOPRINT
BY COUNTRY NOPRINT
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON,
FONT='ARIAL', SIZE=8, $
ENDSTYLE
END
For PDF, images must be in the Application Path on the reporting server. Put the images in Application Folder baseapp.
For HTML, images must be available to the web server. Put the images in baseapp on the web server approot directory. Usually (in a single tier environment) this folder is the same as the reporting server application folder.
I'm not sure if there's a nice and neat way to do this for both HTML and PDF, other than using Dialogue Manager to bypass certain lines of code depending on which format was selected.
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
Student data is in Oracle, photographs are stored on a network drive as student_id.jpg (123.jpg, 987.jpg).
1. 'J:\photos\' || DTBL_STUDENTS.DTBL_STUDENTS.STUDENT_ID || '.JPG' means the photos are on the J Drive of the
Reporting Server in the APP Folder photos.
1a. If they are not actually on the Reporting Server J Drive, see next idea.
2. APP MAP to the Network Drive that houses the images via edasprof.prf (best way to do it)
2a. May need the actual IP address.
3. FTP "ALL" images to the Reporting Server, into an Application folder (worst case)
3a. The Reporting Server has no idea where these images are...
4. Wouldn't you have to JOIN the Student_ID from ORACLE to the STUDENT_ID on the J Drive to get the correct picture
with the correct student? Maybe not...
Here is an example post of what "I" have done to get images in PDF/PPT formats...
hth
TomThis message has been edited. Last edited by: Tom Flynn,