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     [SOLVED] PDF Drilldown

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] PDF Drilldown
 Login/Join
 
Guru
posted
I have a pdf report displaying a single image that works fine.

I don't always want to use pdf output for this image field for various reasons. I am trying to change the report to html but the image does not show up. The image format is BLOB (.jpg behind the scenes).

Here is my dumbed-down code:

 
TABLE FILE DIM_PERSON_IMAGE
PRINT 
     DIM_PERSON_IMAGE.DIM_PERSON_IMAGE.IMAGE_DATA AS ''
WHERE DIM_PERSON_IMAGE.DIM_PERSON_IMAGE.BANNER_ID EQ '&BANNERID';
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=DIM_PERSON_IMAGE.DIM_PERSON_IMAGE.IMAGE_DATA,
     IMAGE=(DIM_PERSON_IMAGE.DIM_PERSON_IMAGE.IMAGE_DATA),
     SIZE=(1.500000 1.500000),
$
ENDSTYLE
END
 


Like I said, fine in PDF, not so fine in HTML (red x appears)

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Platinum Member
posted Hide Post
As far as I can determine BLOB images are only supported in PDF format.


WF 7.7.04, WF 8.0.7, Win7, Win8, Linux, UNIX, Excel, PDF
 
Posts: 175 | Location: Pomona, NY | Registered: August 06, 2003Report This Post
Virtuoso
posted Hide Post
Indeed, BLOB images are not supported in HTML format. It doesn't make sense, but that's how it is.

We worked around that by writing a servlet in the application server (tomcat in our case) that handles URL requests for those BLOB images based on some unique identifier. In our reports we generate an URL with the relevant ID in it in the stylesheet.

Something akin to this:
TABLE FILE BLOBTABLE
PRINT
	ID
	DESCRIPTION

BY CATEGORY

WHERE CATEGORY EQ 'FancyCars';

ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=DESCRIPTION, URL=http://applicationserver:8080/avblob/AVBlob/database-name/table-name? (id=ID),$
ENDSTYLE
END


In the above, "avblob" is the name with which we registered our servlet in Tomcat's server.xml.

As you can see, we went for a fairly flexible approach where we can select between several databases (using JDBC) and tables.
For security reasons, it's wise to make sure that only specific tables in specific databases can actually be accessed through such a servlet. That's a bit harder to implement, but you need to configure what JDBC connect string to use anyway.

If you don't need all that, you can also just hardcode that stuff into your servlet - that's more secure as well.

The one thing that this approach doesn't give you (although I think it is possible) is WF's user authentication on those BLOBs.

Unfortunately, even our flexible approach is still fairly site-specific. It's not really suitable for a wider audience. Ultimately, providing such a feature is the responsibility of IBI, but they're just telling everyone that they don't support this and continue to ignore the problem.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Guru
posted Hide Post
My solution was to use htmlform having blob images as a pdf frame with the report as html for better drilldown functionality. I could have used pdf, but the drilldowns open in the default browser causing the users to signon again (if different than the current). The servlet is a good idea, maybe sometime in the future...


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Nevermind, the pdf viewer toolbars clutter up the frame for users that have readers like foxit..

I have pdf drilldowns in this compound image/detail pdf report. The BLOB images have to be pdfs in order to work. PDF drilldowns not in adobe open in the users default browser, not the current one (which means they would have to signon again if it wasn't their default browser). I'm stuck.

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
I posted too many times, but here I am trying to do. Instead of having the BLOB image as a frame, I kept the pdf report the same size (just having a picture in the top left corner with blank space everywhere else) and created a frame for it. Then I converted the detail part of the report into an html report and overlayed the detail report on top of the pdf report:
_______
|P _ _
| |rrr|
| |rrr|
|______

So the r's are the detail report (html) in a frame on top of the p (picture) report (pdf). This way I can use BLOB in pdf and still have all the same functionality as html. Of course if the user wanted to print the pdf out they would only see the picture, but that is not a requirement for this report.

I am not sure how well this will work since foxit would have to be in all the browsers.


BTW if you do want to do a PDF drill down in the MRE, the syntax is:

 -SET &URL= IF &browser EQ 'Chrome' THEN &SERVER_NAME | &FOCEXURL | 'IBIWF_msgviewer=OFF&|IBIMR_drill=X,' | &IBIMR_domain | '&'
-ELSE &FOCEXURL | 'IBIWF_msgviewer=OFF&|IBIMR_drill=X,' | &IBIMR_domain | '&';
SET FOCEXURL='&URL'
 


Where SERVER_NAME and IBIMR_domain can be set to pass in the client custom settings, FOCEXURL is passed by default, and you have to determine the browser through your own javascript. Chrome wants the server appended for some reason.

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report This Post
Guru
posted Hide Post
Ok, the final solution is this link (URL_PROTOCOL and SERVER_NAME are client variables I had to set to pass):

 
-SET &URL = &URL_PROTOCOL | '://' | &SERVER_NAME | &FOCEXURL | '&|IBIF_ex=app/adviseedetailcompound&|CLICKED_ON=&';
...
URL = '&URL' ( \
...
 

This message has been edited. Last edited by: J,


WebFOCUS 7.7.03/8.0.08
Dev Studio 7.7.03/8.0.08
App Studio 8.0.08
Windows 7
ALL Outputs
 
Posts: 402 | Location: Upland, IN | Registered: June 08, 2012Report 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     [SOLVED] PDF Drilldown

Copyright © 1996-2020 Information Builders