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     [CLOSED]Struggling with styling with multiple reports.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Struggling with styling with multiple reports.
 Login/Join
 
Member
posted
Hi, I'm new on the forum and with FOCUS language too... and I'm really about to go crazy with this one...

FYI, I'm using DevStudio 8105 on Unix with Oracle DB.

So..I need to create a 'multiple report' report (on the same page) (for instance: 'North America Sales Summary' and 'Europe Sales Summary').
Ok...don't ask...it's the requirement...It made no sense and I know...

One thing to know, these two reports will always fits on one sheet...it's two really small grid.

I'm almost there... In my .fex, I have written two TABLE FILE

EXAMPLE:

TABLE FILE SALES
HEADING
"North america and Europe sales"
"EXECUTED_BY: blablabla"
"EXECUTED_ON: blablabla"

SUM AMOUNT
BY CLIENT
WHERE REGION EQ 'AM'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE ROW-TOTAL AS 'Total'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML AS TAB1
...

ENDSTYLE
END

-* BEGINNING OF THE SECOND REPORT (within the same FEX)

TABLE FILE SALES -*(yes, sales again)
SUM AMOUNT
BY CLIENT
WHERE REGION EQ 'EU'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE ROW-TOTAL AS 'Total'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML AS TAB1
...

ENDSTYLE
END

-RUN


END OF THE EXAMPLE:


The problem is:

When I don't apply styling to the reports, everything is fine (well, ugly but the output is ok).
The moment I'm trying to have a header (only on the upper report) or/and a different styling on the first and second report (DATA, HEADERS, TOTALS, ACROSS), everything become a mess.

I've tried the followings without success :

- compound reports
- two different stylesheets

The nearest I came up it's when I reproduce each line of styling in both reports, even if one have an ACROSS and the other don't... For my 10 rows header in the first report, I must have 10 blanks for the second report...I obviously end up with 10 blank lines between the two reports... visually, it's really bad.

how can I have different styling applied on two different report within the same FEX.

Thanks a lot for your help !!

PS:I know it might be unclear so don't hesitate to ask questions

Richard

This message has been edited. Last edited by: <Emily McAllister>,


WF 8.0.0.9, Unix, All Outputs
 
Posts: 2 | Registered: January 12, 2016Report This Post
Virtuoso
posted Hide Post
Save each report in a separate report. Then create a new Document and insert the two focexecs into the document. That way you'll have one page that contains both reports independent of each other. You can have whatever style you want for each of them.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
In this example, the styling seems to be working for the two reports. What is the specific issue? I can only guess your example doesn't illustrate the problem you see.
SET PAGE-NUM=NOLEAD
-RUN

TABLE FILE CAR
SUM 
SALES

BY CAR
ACROSS WEIGHT

WHERE COUNTRY EQ 'JAPAN'

HEADING
"JAPAN <+0>SALES"

-*ON TABLE ROW-TOTAL AS 'TOTAL'
-*ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML AS TAB1
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL',
SIZE=9, BORDER=1, BORDER-COLOR=SILVER,
$
TYPE=HEADING, STYLE=ITALIC, SIZE=10, $
TYPE=HEADING, ITEM=1, COLOR=RED, $
TYPE=TITLE, STYLE=BOLD, COLOR=SILVER, $
TYPE=ACROSSTITLE, STYLE=BOLD, COLOR=SILVER, $
TYPE=GRANDTOTAL, COLOR=RED, $
ENDSTYLE
END
-RUN

TABLE FILE CAR
SUM 
SALES

BY CAR
ACROSS WEIGHT

WHERE COUNTRY EQ 'ENGLAND'

HEADING
"ENGLAND <+0>SALES"

ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML AS TAB1
ON TABLE SET STYLE *
TYPE=REPORT, SQUEEZE=ON, FONT='ARIAL',
SIZE=9, BORDER=1, BORDER-COLOR=SILVER,
$
TYPE=HEADING, STYLE=UNDERLINE, SIZE=10, $
TYPE=HEADING, ITEM=1, COLOR=GREEN, $
TYPE=TITLE, STYLE=BOLD, COLOR=NAVY, $
TYPE=ACROSSTITLE, STYLE=BOLD, COLOR=NAVY, $
TYPE=GRANDTOTAL, COLOR=GREEN, $
ENDSTYLE
END
-RUN


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
When you post code, it's best to write code using one of the IBI supplied files, anyone with WebFOCUS can run and debug the code.

I've definitely had problems with styling when outputting two reports, but the example I provided doesn't have the issue. I need to see the code hidden behind the ....


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
When you add ...
  
SET HTMLCSS = ON

... you see the difference.
The heading is now for both reports GREEN

The inline stylesheets are using the same classnames and the last will overide the first.
 
Posts: 1 | Registered: June 30, 2015Report This Post
Member
posted Hide Post
quote:
Originally posted by BabakNYC:
Save each report in a separate report. Then create a new Document and insert the two focexecs into the document. That way you'll have one page that contains both reports independent of each other. You can have whatever style you want for each of them.


I'm not sure to understand what you meen...I've allready tried to have another procedure with two includes (my two reports) and it doesn't work. And it make sense since include only append the code so I end up with the exact code and the same result. Thanks for your help


WF 8.0.0.9, Unix, All Outputs
 
Posts: 2 | Registered: January 12, 2016Report This Post
Virtuoso
posted Hide Post
Create two .fex files with each TABLE FILE code you currently have in one .fex. So you now have Rep1.fex and Rep2.fex.

Then CREATE, NEW, DOCUMENT and insert Rep1 and Rep2 in the document.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
I've had the exact same problem. The html stylesheets that are created for both reports use the same IDs, so some of the styling from the first report bleeds into the second. It can be infuriating, as a minor adjustment to the first report can send the second on a bender when they both had worked fine together.

I solved the problem with html iframes. I run each report via a separate focexec, each delivered to its own iframe on a single output page. That is, when the user clicks the Submit button, an html page comes up with two iframes in it, I use the page's onload trigger to execute one focexec in one iframe on the page, execute the other in another iframe. That keeps everything very separate.

It ain't pretty, but it's very dependable.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Expert
posted Hide Post
When posting code, it's a good idea to be precise. There's no mention of HTMLCSS in the original post. As both BabakNYC and John suggest, iframe is the best way to deal with 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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Richard,

You are taking advantage of quirk in most browsers where they will keep reading HTML content even after a
</html>
.

Your original FEX sends the following code to your browser:

<html>
<head>...</head>
<body>...</body>
</html>
<html>
<head>...</head>
<body>...</body>
</html>

but the way CSS works is that the last reference to an element will override any attributes of the element that has been set earlier in your code - hence "cascading"

As others have mentioned you will need to either code as a document or separate iframes. The document will give you a more freedom for changing report format - try your orignal code in either PDF or XLSX format and you will only see one report displayed.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
Thanks John for the suggestion, I had a similar problem very recently but ends up with coding the same styling in both TABLE requests. I will have to give a try using iframes.


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report 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     [CLOSED]Struggling with styling with multiple reports.

Copyright © 1996-2020 Information Builders