|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
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, Prod: WF 7.1.3 WinXP Dev: WF 7.6.4 WinXP |
||
|
|
Virtuoso |
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.
|
|||||
|
|
Virtuoso |
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...
|
|||||
|
|
Master |
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 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes |
|||
|
|
Virtuoso |
Yep...that would be the trick.
|
|||
|
|
Virtuoso |
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 WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K WF Client: Linux w/WebSphere, Servlet, CGI |
|||
|
|
Platinum Member |
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 Current Client: WebFOCUS 7.1.4 Client: Windows, Reporting Server: Unix, Data: Oracle, Teradata Local Laptop: WebFOCUS 7.6.5 on Vista/Apache/Tomcat, Data: FOCUS, MS Access |
|||
|
|
Platinum Member |
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]? Prod: WF 7.1.3 WinXP Dev: WF 7.6.4 WinXP |
|||
|
|
Virtuoso |
Check this link for instructions on how to mark the post solved:
http://forums.informationbuilders.com/eve/forums/a/tpc/...1057331/m/9471069592 Ginny --------------------------------- Prod: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15 Dev: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15 Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

