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] Including a style sheet with an &var

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Including a style sheet with an &var
 Login/Join
 
Gold member
posted
I have the following line in all of one customer's fex files for a dashboar

&STYLE

This line shows the following in the debug mode

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/blue.sty,$

I get the following error

(FOC3294) CANNOT OPEN INCLUDED STYLESHEET AT LINE 56:
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/blue.sty

When I copy the line from debug into the code overwriting the &STYLE line it runs perfectly.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Expert
posted Hide Post
I think that you would need to use &STYLE.EVAL to ensure the variable was resolved pre-parsing.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
That (.EVAL) should make no difference. Either way, the text associated with &STYLE gets appended to FOCSTACK.

I am not sure how IBFS:/FILE references work. But if that syntax must be intercepted by MR and converted to an alternative form that the reporting server can understand, that would explain why this fex failed: When you hide syntax in a &var, you deprive MR's static code analysis of the opportunity to parse and modify it.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I agree Jack, it should make no difference. However, I have seen before that using &variables to include an external reference such as this appears OK in the trace but hasn't been available at the time of parsing the source and therefore the error of file can not be found is generated.

At least it's worth a shot to remove the doubt.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
If it's a fex in the MR repository, there are three participants in the process:


  • On the "client" end, MR does a static analysis, to performs MR-specific substitutions. &STYLE and &STYLE.EVAL are equally opaque to MR.
  • On the Server end, the FEX File Parser will move identical results to focstack, whether with &STYLE or &STYLE.eval (that's what I meant by ".EVAL will make no difference").
  • And (again on the server) the Lord High Executioner will receive and execute identical text in focstack.


The proof of the pudding (as to whether MR modifies the INCLUDE's IBFS: reference) would be to compare the &ECHOs when using &STYLE and when it's hard-coded.

This message has been edited. Last edited by: j.gross,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
haven't been able to do variable-based includes in many a year. must use -GOTO to the appropriate -INCLUDE...


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
Gold member
posted Hide Post
We're trying to use a demonstration dashboard for confrences. I'd like to be able to switch the style from one presentation to the next so the customers color scheme will be shown. I tried using a -set &stylevar='style sheet line';$ copied from the code. This is also returning the same error as before. Has anyone come up with a way to select a style this way?


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Virtuoso
posted Hide Post
Then I suggest you sidestep the issue.

Dream up your own name for the file (e.g., conference.sty), and replace the file before each session with a copy of the appropriate .sty file for the respective audience. That way, your application code (including the INCLUDE line) will be static. If you create a set of cmd scripts to handle the details, there will be less that can go wrong, especially if you need to toggle several such file references...


BUT I am still curious to know whether the lines of code in the STYLE section ECHO'ed by the reporting server are identical or different, when you use

&STYLE
(with &STYLE set to 'INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/blue.sty,$')

vs. when you hard-code

INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/blue.sty,$

Let us know.

This message has been edited. Last edited by: j.gross,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
....or
fix it within the .sty


-IF &CUSTOMER EQ 'A' THEN CONTINUE ELSE ENDIF_CUSTOMER_A;

...stylesheetcode here

-ENDIF_CUSTOMER_A

-IF &CUSTOMER EQ 'B' THEN CONTINUE ELSE ENDIF_CUSTOMER_B;

...stylesheetcode here

-ENDIF_CUSTOMER_B


G'Luck


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Gold member
posted Hide Post
The suggestions to copy the style sheet to a common name or to handle it in the code would both work. My only issue would be that I may have a few dozen style sheets. The following code does not work for me but runs fine if I take the -* off the INCLUDE = endeflt,$

-SET &NEWSTYLE='INCLUDE = endeflt,$';
TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE &NEWSTYLE
-* INCLUDE = endeflt,$
ENDSTYLE
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Virtuoso
posted Hide Post
quote:
-SET &NEWSTYLE='INCLUDE = endeflt,$';
TABLE FILE CAR
(snip)
ON TABLE SET STYLE *
INCLUDE &NEWSTYLE
ENDSTYLE
END


After the substitution, the &ECHO should show

INCLUDE INCLUDE = endeflt,$


Why would you think that would "work"?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
is your style sheet in mre? I had a similair issue, when i copied the style sheet into an application folder it worked. For some reason it seems to only look on the reporting server.

Actually after looking at my code closer and wasn't for a stylesheet but for a fex. But it could be a similair issue.

Here is the code I used.

 

-SET &ADDITIONAL_INCLUDE = 'portal_accounting_customer_aging_summary_column_alignment.fex' ;

-IF &ADDITIONAL_INCLUDE EQ '' GOTO AFTER_INCLUDE_ADDITIONAL ;

-MRNOEDIT -INCLUDE &ADDITIONAL_INCLUDE.EVAL

-AFTER_INCLUDE_ADDITIONAL
 


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Virtuoso
posted Hide Post
The question in my mind was, and still is: is the reporting server ever able to interpret a reference of the form IBFS:/...
-- or is that syntax strictly intended for consumption by the "client" side (i.e. MR)?

If the latter, MR must do something to transform
INCLUDE = ibfs:/file/ ... ,$
into a reference (or expansion in-place) that is digestible by wfs ("server"). And it would explain why using an amper variable to insert a correct-looking INCLUDE=IBFS:/... reference does not work.

Can anyone contribute an authoritative answer, yea or nay?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
J.Gross
The double include was bad timing as I forgot that I was testing some thing right before I copied it. I'm going to keep plugging away but I have yet to find a solution.

Thanks for all the advice.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 74 | Registered: December 23, 2013Report This Post
Expert
posted Hide Post
As I previously mentioned, using amper variables in INCLUDE statements hasn't worked reliably in a very long time, EVAL or not EVAL. It's probably even more difficult in v8.

I've used -GOTO statements, *something* like:

...

-GOTO LABEL_&COMPANY

-LABEL_COMP1
-INCLUDE baseapp/stylecomp1.sty
-GOTO LABEL_END

-LABEL_COMP2
-INCLUDE baseapp/stylecomp2.sty
-GOTO LABEL_END

-LABEL_COMP3
-INCLUDE baseapp/stylecomp3.sty
-GOTO LABEL_END

-LABEL_END

...

(You'll have to make sure you have a label for every possible &COMPANY value - you could generate these lines using a Dialogue Manager loop).



"We're trying to use a demonstration dashboard for conferences"

An alternative to the above method would be to programmatically copy a specific style file to a generic file, using the APP COPYFILE command or an OS command.

Something like:

...

APP COPYFILE baseapp/style&COMPANY FOCSTYLE baseapp/style FOCSTYLE DROP

...

-INCLUDE baseapp/style.sty

...



Another method would be to store the style sheet for each company in a different folder, then use APP MAP to add the folder to the application path.

Create folders like these:

C:\ibi\apps\comp1, C:\ibi\apps\comp2, C:\ibi\apps\comp3, etc.

Store the style sheet for each company in the appropriate folder, each having the same file name.

Map the appropriate folder, then include the style file.

Something like this:

APP MAP WFSTYLE C:\ibi\apps\&COMPANY
-RUN

...

-INCLUDE wfstyle/style.sty

...


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
Modify the code appropriately for WF 8.


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
  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] Including a style sheet with an &var

Copyright © 1996-2020 Information Builders