Focal Point
compound report with a graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5911018331

November 10, 2004, 02:07 PM
Pam Kratt
compound report with a graph
I need to create a report with a graph except that each report/graph combination should only contain 1 account. So, if multiple accounts are chosen by the user, I need to provide a report and graph for account 1 and immediately following with a page break a report and graph for account 2, then a report and graph for account 3, etc.

I am able to create a report with a graph containing all accounts but that is not what the user wants because they want separate pages for each account. I'm struggling with how I would create this within webfocus. If it was just a report (no graph) I would have no problems. I am able to create multiple graphs (one for each account) but since they are save to a svg, all accounts are within the same svg and are therefore pulled up together in one lump. Any suggestions?
November 10, 2004, 03:08 PM
GCohen
A new graph is draw for each outter BY field if there is more than one.
eg
graph file car
heading
" for <country "
sum sales
by country across bodytype
end
November 10, 2004, 09:12 PM
susannah
pam, whats an svg? (is that some graphic file format, i'm guessing) and whats your output format? are you PDF'ing or are you producing web output?
If its HTML, i'll show you a way that i do this.
November 10, 2004, 09:33 PM
suzy_smith
svg files are Scaleable Vector Graphics files that render 2-D graphics in XML. Here's a link:

http://www.w3.org/Graphics/SVG/

svg is a new feature in 5.3
November 11, 2004, 10:56 AM
Pam Kratt
The SVG graphs(scalable vector graphs) have much better resolution than a GIF file. Hopefully they will also get rid of some of the overlap problems we have with GIF. We've been waiting for a couple of months for this new version to come out because IBI indicated many of our GIF problems will be fixed with SVG.

Our web output is html and pdf (we provide the users both options). We save the graph to a GIF and then reference it in the PDF code (HTML is done differently) by putting the following in the stylesheet:
TYPE=REPORT, IMAGE=TWRRGRA.GIF, POSITION=(0.5 1.35), SIZE=(5.5 3.5), $
There is a bug with GIF that doesn't allows multiple graphs to be saved to a GIF, so I'm going to try the SVG. I know we can create multiple graphs by adding the additional by statements but I need to show a graph then a report then a graph and another report, etc. Not one graph that shows all accounts and then all the reports for all the accounts following it.

My issue is generating the graph for the 1st account then creating the 2 page report that shows the graph and then the report for account 1 and then immediately following that report, show graph and the report for account 2, etc.
November 12, 2004, 02:32 PM
susannah
i can't do it for you in pdf. but i can show you how i do it in html.
you're basically going to build your document
by looping thru your elements, say you have 50 of them, 50 widgets.
for each widget, you'll produce a table and a graph.
You'll name these elements TAB1 and GRAPH1
and go up to TAB50 and GRAPH50.
All these temporary tables get held in the agent, not filedeffed.
Now, once you've finished the fex part, go to your output table area.
-HTMLFORM BEGIN
<TABLE>
<TR>
-* you can loop here as well
<TD>
<!-- WEBFOCUS TABLE TAB1 -->
<TD>
!IBI.FIL.GRAPH1;
</TR>
-* end of loop if you want to do a loop
-* otherwise write them out individually
<TR>
<TD>
<!-- WEBFOCUS TABLE TAB2 --> etc.

Get the idea? if this works for you, let me know and i'll show you how to pagebreak in html.
OH, and thanks Suzy_Smith for reminding me what svg stood for.
November 17, 2004, 02:03 PM
Pam Kratt
Can you expand on how you loop in html. I got the pdf code to work, but I'm having troubles getting the looping to work in html (I'm new to html). I'm able to loop through and create all the reports and graphs since that is standard webfocus, it's just getting them to display that I'm having problems with. Here is the code I need to loop around. Do I need to put a javascript statement in html (I searched the web and that's all I could find). I couldn't get it to work yet, but so far that's all I've been able to find.

!IBI.FIL.HEADER&CNT.EVAL;
!IBI.FIL.GRAPH&CNT.EVAL;
!IBI.FIL.TABLE&CNT.EVAL;