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] Another EXL2K Image question...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Another EXL2K Image question...
 Login/Join
 
Guru
posted
Okay, I have EXL2K reports that have a logo image on the first line of the header. I've always done it using a DEFINE as follows:
DEFINE FILE CAR
SLOGO/A100='http:\yada\yada\yada.gif';
END
TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE SUBHEAD
"<SLOGO "
"Car Report"
ON TABLE PCHOLD FORMAT EXL2K
END


Works perfectly. Well, now I have a new requirement to produce the report even if there's no data. So, I had to SET EMPTYREPORT=ON. And, of course, when the report is empty, the logo is not there. Sigh. I tried just imbedding the image using the stylesheet as follows:

TABLE FILE CAR
PRINT CAR
BY COUNTRY
ON TABLE SUBHEAD
" "
"Car Report"
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
     UNIT=IN,
     ORIENTATION=LANDSCAPE,
TYPE=HEADING,
     IMAGE=http:\yada\yada\yada.gif,
$
ENDSTYLE
END


That doesn't work. I add POSITION and SIZE parameters, doesn't work. I put it under TYPE=REPORT, doesn't work. But, if I use HTML, it works. So, how do I do this in Excel? By the way, I can't use a template because it is a compound report.


WF 7.1.3, Windows XP

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


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Virtuoso
posted Hide Post
I have not tested this...so don't know if it will work, but try SET EMPTYREPORT = ANSI

Also you have the Stylesheet with HEADING...but you are trying to style a SUBHEAD.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Ok...had a second to test this...does not appear to work. And to embed an image in EXL2K...you to have to do like you did in the original code. Looks like you are going to have to have something print when it is 0 records and trick it...


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Master
posted Hide Post
Why not test -IF &RECORDS EQ 0 THEN GOTO SOMETAG
where SOMETAG executes the heading with the logo against the car routine printing a line that says "NO DATA TODAY"


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Yep...that would be the trick.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Anatess,

Take a step back from the picture and you can see why your code would not work. A DEFINE establishes a virtual column and populates a value based on your expression for every record as it is retrieved from the database. If no records are retrieved, this value would never be calculated. COMPUTE would not work either because there are no records in the internal matrix on which to apply your expression.

Thus, Pat's suggestion to branch to some alternate code where a record would be retrieved. Something like
TABLE FILE CAR
PRINT COUNTRY NOPRINT
HEADING
"heading here"
WHERE READLIMIT EQ 1
stylesheet here
END

inserting your DEFINEs, images, HEADINGS, etc. as appropriate to express the "NO DATA" condition.


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
How about using your first suggestion, EMPTYREPORT, and inserting the image in your HEADING via the STYLE sheet, like this:

TYPE=HEADING, IMAGE=MYLOGO.GIF, POSITION=(0 0), SIZE=(1.00 0.75),
ALT='This logo was placed here by Douglas Lee',$

Change the POSITION, which is shown to be in the upper left corner of the margins, and SIZE to match the actual size of the image. Note, the image size can be different then the actual size. However, it should match to ensure the correct / desired display and aspect ratio.

Or, use the Report / Image... from Report Painter which produces something like this:

TYPE=REPORT, IMAGE=flag_usa.bmp,$

-Doug




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Okay, I went ahead and did like Prairie said... I checked &RECORDS and if it is 0 then I branched to a piece of code that reads FOCAPPQ (readlimit eq 1) and just display the header with No Data Available on detail.

Doug, I couldn't get the image to display from STYLESHEET. I don't know why. I even put the full http: address for the image, still no dice. I coded it just like your sample too. Maybe it doesn't work for compound Excel reports, I don't know...

How do I mark this thread [SOLVED]?


WF 8.1.05 Windows
 
Posts: 333 | Location: Orlando, FL | Registered: October 17, 2006Report This Post
Expert
posted Hide Post
Check this link for instructions on how to mark the post solved:

https://forums.informationbuilders.com/eve/forums/a/tpc/...1057331/m/9471069592


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report 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] Another EXL2K Image question...

Copyright © 1996-2020 Information Builders