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     Multiple graphs on BY field?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Multiple graphs on BY field?
 Login/Join
 
<kvn>
posted
Is there a way to do this?

I have a hold report with 2 BY fields and a PRINT. I want the first BY field (ACCOUNT) to be a graph and the 2nd BY field (DATE) and PRINT (PCT) axises on that graph.

TABLE FILE TREND
SUM PCT
BY ACCOUNT
BY DATE
ON TABLE HOLD AS ACCTHOLD FORMAT FOCUS
END
 
Report This Post
<kvn>
posted
I actually need to make 2 different graphs side by side with the same 2 graphs under for the BY field.

Example

ACCOUNT 1
Graph 1 | Graph 2
--------------------
ACCOUNT 2
Graph 1 | Graph 2
--------------------
ACCOUNT 3
Graph 1 | Graph 2
 
Report This Post
Guru
posted Hide Post
Have you tried GRAPH FILE TREND.
Remove the HOLD FORMAT FOCUS.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Guru
posted Hide Post
BTW. Using 2 BY fields should give you multiple graphs.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
<kvn>
posted
I know changing the TABLE to graph will work and using 2 BY fields will give me multiple graphs. I'm using that hold file to graph off of.

I'll try to explain myself better. I just realized I didn't make much sense in my post.

Graph 1
TABLE FILE TREND1
SUM PCTAVG
BY DATE
ON TABLE HOLD AS ACCT1HOLD FORMAT FOCUS
END

Graph 2
TABLE FILE TREND2
SUM PCTTOTAL
BY DATE
ON TABLE HOLD AS ACCT2HOLD FORMAT FOCUS
END

Report
ACCOUNT 1
Graph 1 | Graph 2
--------------------
ACCOUNT 2
Graph 1 | Graph 2
--------------------
ACCOUNT 3
Graph 1 | Graph 2
--------------------
ETC...


So what I need to do is create a report with 2 side-by-side graphs, created from 2 different HOLD files, for each ACCOUNT.
 
Report This Post
<Grzegorz>
posted
Below is the example which might be helpful for you. The COUNTRY is used as ACCOUNT, and the CAR as DATE.
It is not the most elegant solution, but it is working at least for the HTML output.

-* First, dump all countries to the temporary table:
TABLE FILE CAR
BY COUNTRY
ON TABLE HOLD AS CTRYHLD FORMAT ALPHA
END
-RUN
-*--------------------------------------------------
-* Read the list of dumped countries:
-SET &CTRYLIST = '';
-SET &CTRYLIST0 = &LINES;
-REPEAT :LISTLOOP FOR &CNT FROM 1 TO &CTRYLIST0;
-READ CTRYHLD &TMPVAR.A10 NOCLOSE
-SET &CTRYLIST.&CNT = &TMPVAR;
-:LISTLOOP
-SET &CTRYLIST = &CTRYLIST1;
-*-------------------------------------------------
-* For each country within the list, create two graphs
-* one for the total, and one for the average.
-* Hold the created graphs as HTML tables.
-REPEAT :HOLDLOOP FOR &CNT FROM 1 TO &CTRYLIST0;
GRAPH FILE CAR
SUM SALES
BY CAR
WHERE COUNTRY EQ '&CTRYLIST.&CNT'
ON TABLE HOLD AS TOTHLD&CNT FORMAT HTMTABLE
END
-RUN
GRAPH FILE CAR
SUM AVE.SALES
BY CAR
WHERE COUNTRY EQ '&CTRYLIST.&CNT'
ON TABLE HOLD AS AVEHLD&CNT FORMAT HTMTABLE
END
-RUN
-:HOLDLOOP
-*-------------------------------------------------
-* Graphs will be displayed on the HTML page:
-HTMLFORM BEGIN

Multiple Graphs


-* For each country display country name,
-* and two graphs for this country:
-REPEAT :HTMLOOP FOR &CNT FROM 1 TO &CTRYLIST0;







-:HTMLOOP
&CTRYLIST.&CNT|
!IBI.FIL.TOTHLD&CNT|;!IBI.FIL.AVEHLD&CNT|;



-HTMLFORM END
Regards
Grzegorz

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
<kvn>
posted
Grzegorz your the BEST! Big Grin
 
Report This Post
<kvn>
posted
Is there a limit to how many variables you can have in a fex? My graphs are stopping at '!IBI.FIL.TOTHLD100;' using Grzegorz solution.
 
Report This Post
<Grzegorz>
posted
I suppose that it is rather a limitation on the size of the generated FOCUS code.

The solution I proposed in previous post is not suitable for the "large number of COUNTRYies in the CAR table".
If you have a large number of ACCOUNTs in the data source, you can try to split the request in order to make it smaller (if possible). For example:

  • Add additional, very selective parameter to the report, representing an "account range".
  • On the launch form ensure that the user can choose only one "account range" at a time.


Such a kind of report is also a good candidate for scheduling (although simply schedule it, does not solve the problem).

Regards
Grzegorz
 
Report 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     Multiple graphs on BY field?

Copyright © 1996-2020 Information Builders