Focal Point
Tip of the Year 2007

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3371074812

March 16, 2007, 11:13 AM
hammo1j
Tip of the Year 2007
Just a little light hearted fun for 2007. We could put in our best Tips and Techniques that we've come up with and it could go to a vote in 2008.

Here's mine for starters

TIP 1: &&INCLUDE.EVAL to Force evaluations of -INCLUDES on the Server

MRE looks for -INCLUDES on the WFCLIENT in the domain in which the report is contained so this means that common -INCLUDES need to be copied to all the directories. Add in the 8 character limit and you have a bit of a 'mare even with -MRENOEDIT

This gets round the problem by forcing the server to evaluate the -INCLUDE since the parser on MRE is more simplistic and does not understand .EVAL.

Simply define

-SET &&INCLUDE = '-INCLUDE'; in EDASPROF and you're away.

This works great with stylesheets

ON TABLE SET STYLE *
&&INCLUDE.EVAL FSLLAND.STY
TYPE=DATA,BORDER=LIGHT,$

-IF &WFFMT NE 'PDF' THEN GOTO NO_PDF ;
TYPE=REPORT,
COLUMN=PCO_HOME_PHONE_NO,
WRAP=1.0000,
$
TYPE=REPORT,
COLUMN=PAD_WORK_ADDRESS,
WRAP=1.500000,
$
-NO_PDF



Can anyone beat that!



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
March 16, 2007, 01:37 PM
susannah
ham...where do we actually put the text to be -INCLUDEd...are you saying that we put the includable modules somewhere other than the individual mre domains?
This could be the equiv of string theory if i can get a little help learning how you implement..

update: i tried it with a chunk of DEFINE code..
it worked across domains when i built the RO, passed the Domain Builder RUN test on the RO, but them bombed like crazy (java error) when opening the actual RO and clicking on Selection Criteria

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 19, 2007, 04:21 AM
hammo1j
Susannah

To implement you just put the include in the MRE and make sure that the item you are -including is on APP PATH.

-SET &DUMMY = &FRDATE.From Date (DD/MM/YYYY). ;
-SET &DUMMY = &TODATE.To Date (DD/MM/YYYY). ;
&&INCLUDE.EVAL UT1078_Smart_Dates

Remember that if you are prompting (we use amperautoprompt) your prompt logic (as in the above example) will need to be separated since it is the wf client that processes the prompting.

It takes a bit of getting used to and but it is a sound technique we have used for about a year now.

Regards

John



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
March 19, 2007, 08:25 AM
S.J. Kadish
I have not had a chance to test the code, though it looks intriguing. But your suggestion of a "Tip of the Year" is a great one. Kathleen & Kerry - maybe this could be a nice competition for Summit.


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
March 19, 2007, 09:00 AM
susannah
for me it doesn't work; i'm using just the &&INCLUDE technique, to include a bunch of define code. it only works from DOMAIN BUILDER, but when trying to run from the end-users own domain view, it explodes. the prompting isn't an issue, since my &&INCLUDE doesn't do anything re &vars. its the difference between the 2 approaches...domain builder vs domian.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 19, 2007, 09:25 AM
Francis Mariani
In MRE, we stuck all our common code in one domain and mapped that domain as an App - no troubles with -INCLUDE this way.

Of course I assume this will only work if the Web Server and the WebFOCUS server are on the same machine.


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
March 19, 2007, 09:44 AM
susannah
you'll show me at Summit, F? i'm not getting it, we're on the same machine as well.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID