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.
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
May 13, 2015, 02:35 AM
Dave
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
May 13, 2015, 08:37 AM
JRLewis
Could you not run the fex to create the hold file before the compound report, then access it within it?
WebFOCUS 8
May 13, 2015, 09:55 AM
Dave
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 ) with different parameters...
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
May 13, 2015, 12:49 PM
SAI_Ryan
Dave,
You are the man! Hold file and test report are now working. Thank you very much!
WebFOCUS 8 Windows, All Outputs
May 13, 2015, 01:29 PM
j.gross
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
May 14, 2015, 07:31 AM
eric.woerle
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
May 14, 2015, 10:01 AM
SAI_Ryan
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
May 18, 2015, 03:25 AM
Dave
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
May 18, 2015, 09:11 AM
j.gross
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
May 19, 2015, 01:39 AM
Dave
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.