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     [SOLVED] Multiple Reports From One Hold File

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Multiple Reports From One Hold File
 Login/Join
 
Silver Member
posted
Good Evening Ladies and Gentlemen,

I am in the midst of creating a compound document in Appstudio. On one of the pages, the users are requesting three reports. All three of the reports can use one data set to be created. Rather than running three queries I would like to run one, create the hold file in a temp directory somewhere, then use that temp data source to populate my three reports.

I'm having some trouble to have it run as intended.

Right now my document code looks like this.

-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, ORIENTATION=LANDSCAPE, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,ORIENTATION=LANDSCAPE,', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(1.333 0.938), DIMENSION=(3.597 1.344), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 1.333in; top: 0.938in; width: 3.597in; height: 1.344in; position: absolute; z-index: 1;', $
COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(0.604 2.708), DIMENSION=(10.104 3.646), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.604in; top: 2.708in; width: 10.104in; height: 3.646in; position: absolute; z-index: 2;', $
END
SET COMPONENT='report1'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/internal/~rlafounta/AI_Review_Companion/HoldFile.fex
SET COMPONENT='report2'
-*component_type report
-INCLUDE IBFS:/WFC/Repository/internal/~rlafounta/AI_Review_Companion/SampleReport.fex
COMPOUND END

The HOld File Procedure code is this.

TABLE FILE SQLOUT
PRINT
Client_Number
Product
Sponsor
Trade_Date
Order_Action
Investment_Amount
AI_Type
ON TABLE NOTOTAL
ON TABLE HOLD AS AITRANS
ON TABLE SET STYLE *
$
ENDSTYLE
END

And the report procedure looks like this.

TABLE FILE AITRANS
PRINT
AITRANS.AITRANS.Client_Number
AITRANS.AITRANS.Product
AITRANS.AITRANS.Sponsor
AITRANS.AITRANS.Trade_Date/MDYY
AITRANS.AITRANS.Order_Action
AITRANS.AITRANS.Investment_Amount
AITRANS.AITRANS.AI_Type
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENBlue_Medium1.sty,
$
ENDSTYLE
END

Right now I'm getting the error message

0 NUMBER OF RECORDS IN TABLE= 34 LINES= 34
(FOC3296) Error found in Coordinated Compound Report: At Component
(FOC3303) Compound report COMPONENT out of order
Compound Report is TERMINATING.....

I'm guessing this has to do with executing the report before the hold file gets created? Anyone have insight into this?

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 49 | Location: United States | Registered: April 21, 2015Report This Post
Master
posted Hide Post
Ryan, ( I guess ).

Your document is out of order because one of the reports doesn't have output ( the one that fill the HOLD ).

We had similar problems. We wanted to use one HOLD fill many reports in one document. For performance reasons:

I present you : a solution !

Make a fill_da_hold.fex
Add this a the first line
-IF &TMPHLDSTS.EXIST NE 0 THEN L_THE_END;


Add this as the last two lines
-SET &TMPHLDSTS = 'Filled';
-L_THE_END


The first line checks wheter a parameter ( TMPHLDSTS ) exists. The first time you run this fex, the parameter doesn't exist. So it doesn't goto L_THE_END.

The code fills the HOLD.

At the end the parameter TMPSTSHLD is SET with a value, in this case 'Filled'.

The second time ( and third, and fourth, etc. ) the parameter does exist. It just directly to the end of the procedure.



How is this usefull? Well, all fex within a compound statement are run within the same agent. So the HOLD will continu to available to the end.



Now just -INCLUDE fill_da_hold.fex at the beginning of all fex in the compound.

Only the first will actually fill the HOLD, the rest will make use of it.



G'luck.
Dave


_____________________
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
Could you not run the fex to create the hold file before the compound report, then access it within it?


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Master
posted Hide Post
JRLewis,

you can, but only if it's a saved HOLD ( APP HOLD ). Else it will be gone after the session.

Set back of this would be if multiple users create HOLD simultaneously ( 3x word score Sweating ) with different parameters...

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Master
posted Hide Post
Good One


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Silver Member
posted Hide Post
Thanks Jr & Dave. Jr what Dave said is the problem with that as I have 25 users who will run this so it needs to be held at report runtime only.

Dave, thanks for the solution I will work on implementing this afternoon and report back.


WebFOCUS 8
Windows, All Outputs
 
Posts: 49 | Location: United States | Registered: April 21, 2015Report This Post
Silver Member
posted Hide Post
Dave,

You are the man! Hold file and test report are now working. Thank you very much!


WebFOCUS 8
Windows, All Outputs
 
Posts: 49 | Location: United States | Registered: April 21, 2015Report This Post
Virtuoso
posted Hide Post
quote:
...if multiple users create HOLD simultaneously with different parameters...


That should not be a problem: The results (Hold file) for each user go to their respective assigned agent's working directory, and are deleted when the request is completed. So whether the several users' requests are executed in parallel or in series, there is no file conflict or data leakage.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
There is always foccache. I don't know why you are looking to use app hold unless you need this persistent after logout. If that is the case and you are worried about Co conflicting users, then you can always concatenate users names into the hold file name to prevent users from crashing into each other.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Silver Member
posted Hide Post
Eric,

I think there is some confusion since i was trying to respond to two people at the same time. I am not looking to use app hold because I only want the hold to be there at runtime.

With Dave's solution i got it working.


WebFOCUS 8
Windows, All Outputs
 
Posts: 49 | Location: United States | Registered: April 21, 2015Report This Post
Master
posted Hide Post
j.gross & eric.woerle

We ran into the same problem.

The problem is not that other users see the same hold file.
That will only occur when you use APP HOLD to save it somewhere.

The problem was : we don't want to fill the same HOLD file over and over again just because a number of reports within a compound need the same data.

Yes you can use foccache, but you'll still need to check the existence of the hold-file and decide to fill it, or just use it.

Greets,
Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Just bear in mind: Whatever mechanism you use to enable re-use of the hold file across successive related reports, you need to ensure that when the same user restarts it with different parameters the application will not be misled into reporting against the previously pulled data.

Scratch that, I misunderstood the context. Having your fex first pull and HOLD the data for the several components (directing output to the agent's working directory), and then run a compound report against the Hold file(s) should serve your need.

To test the individual component reports, use a driver to run the HOLD request and then the particular component.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Jack,

exactly.

And in our technique we include the 'driver', as you call it, in -all- components.

This enables us to edit individual part and/or change the order of the part without having to think about were the driver is at.

The driver itself checks whether it needs to fill the hold or not.

...

could this be a "tip & tricks" ?


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report 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     [SOLVED] Multiple Reports From One Hold File

Copyright © 1996-2020 Information Builders