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     looping with graph logic

Read-Only Read-Only Topic
Go
Search
Notify
Tools
looping with graph logic
 Login/Join
 
Platinum Member
posted
I am looping with svg graph logic in pdf. No problem normally with the code if data always exists. The user can select multiple accounts and we will display a graph and then a report for account 1, then a graph and a report for account 2. I do this using the code below. The problem I have is if account #2 has no data to graph I get
NUMBER OF RECORDS IN GRAPH= 0 PLOT POINTS= 0
NO DATA TO GRAPH
(FOC3202) BAD VALUE IN STYLESHEET FILE AT LINE: 6 SIZE=(9.5 6.0)G

The file contains each account selected, it just might not have the fields needed to graph. So, how do I circumvent the error from happening. I put in logic to set noofaccts to 0 if only 1 account is selected and there is no data, but I'm not sure how to do this if it happens when multiple accounts are selected. Any suggestions?

-SET &COUNT = 1;

-IF &NOOFACCTS EQ 0 GOTO EMPTYRPT;

-REPEAT PDFLOOP WHILE &COUNT LE &NOOFACCTS;

SET LOOKGRAPH=VBAR
SET 3D=OFF
SET LINES=20
<GRAPH_URL>

GRAPH FILE TWRR_DATA
SUM ...
FLD1
ACROSS DESCRIPTION
WHERE SORTORDER EQ &COUNT
...
ENDSTYLE
ON GRAPH SAVE AS TWRRGR&COUNT FORMAT SVG
END

TABLE FILE MERGE_DATA
PRINT FLD1
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='Letter', LEFTMARGIN=0.350000, RIGHTMARGIN=0.350000,
TOPMARGIN=0.50000, BOTTOMMARGIN=0.500000, SQUEEZE=ON,
ORIENTATION=LANDSCAPE, $
TYPE=REPORT, IMAGE=TWRRGR&COUNT.EVAL.SVG, POSITION=(0.5 1.65), SIZE=(9.5 6.0), $
ENDSTYLE
-IF &COUNT EQ &NOOFACCTS THEN GOTO CLOSEPDF;
ON TABLE PCHOLD FORMAT PDF
-GOTO PDFEND
-CLOSEPDF
ON TABLE PCHOLD FORMAT PDF CLOSE
-PDFEND
END

-SET &COUNT = &COUNT + 1;
-PDFLOOP
 
Posts: 179 | Registered: November 10, 2004Report This Post
<JG>
posted
IF you want to skip the report altogether then place a label �SKIPACC immediately before your line -SET &COUNT = &COUNT + 1;
And put the following code immediately after your graph

-RUN
-IF &RECORDS EQ 0 THEN GOTO SKIPACC ;

If you want to still produce the report create a dummy graph which is stored in a directory such as baseapp and place the following code immediately after your graph.

-RUN
-IF &RECORDS NE 0 THEN GOTO SKIPGRAF ;
!copy c:\ibi\baseapp\dummy.svg TWRRGR&COUNT.EVAL.SVG
-SKIPGRAF

An alternative is to produce the report with no graph

The following goes immediately after the graph
-RUN
-SET &NOGRAPH=IF &RECORDS EQ 0 THEN �Y� ELSE �N�;

The following should replace the graph line in the style sheet

-IF &NOGRAPH EQ �Y� GOTO NOGRAPH;
TYPE=REPORT, IMAGE=TWRRGR&COUNT.EVAL.SVG, POSITION=(0.5 1.65), SIZE=(9.5 6.0), $
-NOGRAPH
 
Report This Post
Platinum Member
posted Hide Post
This works great! Thank you!
 
Posts: 179 | Registered: November 10, 2004Report 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     looping with graph logic

Copyright © 1996-2020 Information Builders