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 have a problem where I have a sql statement that adds padding on the left of a column of data, but it does not translate into the webfocus sql report.
Is there a way to left pad data once in the report?
nbsp goes between the td's even in code brackets, it makes tabs. =p
I tried adding <td> </td>, but it thinks the nbsp is a variable.
select substr(lpad('<td> </td>',2*level) || component_part_no, 1, 150), parent_part_number, level from dw_bill_of_materials where job_number = 'STD' connect by prior component_part_no = parent_part_number start with parent_part_number = '0001';
If possible, i would like to avoid doing the indenting in the sql and have it just in the report so it translates to more formats then just HTML.
Thanks.This message has been edited. Last edited by: Chet,
WebFocus 7.6.2, MRE through SharePoint, Win XP/2k3.
I wouldn't manipulate the width or padding of a data column in SQL - I would use SQL for data retrieval only, then use WebFOCUS for styling the report.
You would like to pad the data column for HTML and other formats - the
<td>& nbsp;</td>
in your SQL will only work for HTML, not for PDF.
For HTML, you can use CSS styling to control the width of the data column (you need to set HTMLCSS ON to create an internal CSS stylesheet:
SET PAGE=NOLEAD
SET SQUEEZE=ON
TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"WEBFOCUS REPORT"
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=SALES, WRAP=3, JUSTIFY=RIGHT, $
END
For PDF, you can use the WebFOCUS style tag WRAP:
SET PAGE=NOLEAD
SET SQUEEZE=ON
TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
"WEBFOCUS REPORT"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, COLUMN=SALES, WRAP=3, $
END
There are probably other ways to achieve this.
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
basically, left pad the part field with spacing by using its level number on a per row basis.
I was thinking a way to do this would to substr it somehow into a defined field where i desinate the start position based on a calulation of the level.
so if its level one start would be (1*3), level two would be (2*3), etc, but I cant figure out a way to tell it to start at a position that i define.
I almost had this using FML, but it failed to show right because the table is not considered a true hierarchy.
This sql statement does give the right results, but now I am stuck at presenting the report as needed. =(
WebFocus 7.6.2, MRE through SharePoint, Win XP/2k3.
If you're writing separate programs for each output type, and you've solved the HTML version, here's an example for PDF - you can simply prepend a number of spaces before the data:
TABLE FILE CAR
SUM
COMPUTE
CONT1/A20 = IF COUNTRY IN ('ENGLAND', 'JAPAN') THEN ' ' | COUNTRY ELSE IF COUNTRY EQ 'FRANCE' THEN ' ' | COUNTRY ELSE COUNTRY;
BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
FONT='ARIAL', SIZE=8, $
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
You can combine your html solution and Francis PDF solution into one report.
the output format can be put into an amper value
-DEFAULT &FORMAT='PDF'; (ask for either HTML or PDF)
....
COMPUTE
FRANCIS/A20=IF COUNTRY IN ('ENGLAND', 'JAPAN') THEN ' ' | COUNTRY ELSE IF COUNTRY EQ 'FRANCE' THEN ' ' | COUNTRY ELSE COUNTRY;
YOURS/A20=IF COUNTRY IN ('ENGLAND', 'JAPAN') THEN '|nbsp& |nbsp&'| COUNTRY ELSE IF COUNTRY EQ 'FRANCE' THEN '|nbsp&|nbsp&|nbsp&' | COUNTRY ELSE COUNTRY;
COMPUTE
CONT1/A20=IF &FORMAT EQ 'PDF' THEN FRANCIS ELSE YOURS;
....
(I'm not sure if the "space" code in HTML is the correct one, but others will know how to do this).
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
thanks for all your help. I was not aware of the pipe option to ignore as a variable. also, the option to change the report by report type is going to be useful as well.
thanks again!
WebFocus 7.6.2, MRE through SharePoint, Win XP/2k3.