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     Loops in a multiple evoking of a single report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Loops in a multiple evoking of a single report
 Login/Join
 
Silver Member
posted
Hi everybody,
I was wondering if there is a way to use a loop in a report that is called more than once throughout a procedure without getting the (FOC1851) DUPLICATE DASH REPEAT LABEL error ? One option is to copy the report multiple times with different names and another is not to use a loop , but both are foolish ...


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report This Post
Expert
posted Hide Post
Yes, use a variable prefix to your labels and pass that variable each time you EX or INCLUDE the fex.

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
Expert
posted Hide Post
I find it safer to use Tony's second oops, first suggestion

EX app/bvmusage_report.fex STARTDATE=20090101 , ENDDATE=&YYMD.EVAL

i do an EX and pass parms on the command line.
that way, the fex is self-contained and the labels don't need any fancy management.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Is this report (both parts) stored on MR, or on the reporting server? On the server I've never had a label-conflict problem induced by multiple -INCLUDEs of a single fex file (or -INCLUDE within a -repeat loop), as long as the inner and out fex have no conflicting labels.

But if your outer fex and inner fex each have a -REPEAT, and they use the same label, that would earn a FOC1851.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Tony A:
Yes, use a variable prefix to your labels and pass that variable each time you EX or INCLUDE the fex.

T


Please expand on that. I find that a label containing amper references, even with .EVAL, is not deemed a "match" by GOTO or the terminal jump of REPEAT. For instance:
-DEFAULTH &SFX='A'
-REPEAT :loop.&SFX FOR &I FROM 1 TO 5 ;
-TYPE *** loop &I ***
-:loop.&SFX.EVAL

Although dialog manager processes the loop code nicely, when the REPEAT's exit condition is finally reached it stops dead with:

(FOC305) SPECIFIED LABEL NOT FOUND: :loop.A

- - -

More thoughts, after looking over some client traces here.

IBI not too long ago announced a change to answer complaints that error messages did not relate to the real location in the underlying focexec. Before that change, MRE would insert the content of a called MR fex (whether invoked by EX or -INCLUDE) in situ, replacing the EX or -INCLUDE line.

But if the same fex was included in multiple places, that led to repetition of identical code inline, leading to label conflicts. My recollection is that under that scheme, as a work-around to the label conflict issue, MR would perform parameter substitution for parameters appearing on the EX command, so Tony's method could be used to overcome the conflict: By the time WFRServer saw the code, the ampers in the labels were gone, and the labels were distinct.

No more. Now (at least as of 7.6.7) the EX or -INCLUDE remains (with the fex reference reworded, app/ removed) and the adhoc fex MR send up to the server loads the referenced MR fex (and any it references, ...) by means of "EX -lines ...". That means the set of fexes operates essentially as if they were all stored on the server in the first place.

That feature's generally a good thing all around -- but I believe as a side-effect any called fex that attached a variable prefix or suffix to its labels to achive uniqueness under the old regime, will fail under the new one: The &var reference will remain as is, in the copy that Server receives; in the -GOTO (or -REPEAT) it will be resolved to the parameter value, and that resolved value will not be found as a label when GOTO (or the at-end operation of -REPEAT) scans for a matching line.

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
Expert
posted Hide Post
Jack,

That sums it up, and confirms my recollection.

However, I would add that I have seen this behaviour change between releases and I wouldn't be surprised to see it change again ...... and again.

As you and I both know, it is better to proof your code against changes by using well formed logic - something that GUI users might not be able to do - which is why "old" hands like us use the text editer to code!

T
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
I've done this a number of times. The thing I never do is put the eval in. You might want to try that.
 
Posts: 9 | Registered: August 20, 2007Report 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     Loops in a multiple evoking of a single report

Copyright © 1996-2020 Information Builders