Focal Point
Printing Graph

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

April 07, 2005, 01:59 PM
Prarie
Printing Graph
Anyone know the best output method to print a graph and the code to do it. HTML looks great on the screen, but not for printing.

Thanks. Version 5.3.2
April 07, 2005, 02:23 PM
<JG>
Throw it into a PDF, With positioning you can center it nicely. And if your using the new graph engine then use the PDF vector output (FORMAT SVG)

example

GRAPH FILE CAR
SUM DEALER_COST
ACROSS COUNTRY
ON TABLE HOLD AS G1 FORMAT SVG
END
-RUN
SET PAGE=NOLEAD
TABLE FILE CAR
HEADING
" "
SUM COUNTRY NOPRINT
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=G1.SVG, POSITION=(1 2), SIZE=(8 5), $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END

Obviously you will need to play with the position and size attributes.
April 07, 2005, 02:36 PM
<Pietro De Santis>
SVG is a great format.

One question:

To include a graph in a PDF document, one has to first save the graph in a file and then use WebFOCUS style sheet syntax to place the graph image file in a dummy report.

Do you think this is a pretty clumsy method?

What about Dev. Studio newbies? They would have to be aware of this method, it certainly is not suggested by the Graph Assistant.
April 07, 2005, 03:15 PM
Prarie
Well that was what I did not understand...why you had to go thru all that..and was hoping there was a better way...than putting in a dummy report...but JG..should know..
I had never tried this before..and was just thinking I was missing something. Even looked in the GUI..and you are right, no mention of how to put in PDF.
Thanks for the help.
April 07, 2005, 03:59 PM
<JG>
There is an Adobe plug-in for IE that allows direct display of .SVG graphs generated by
ON TABLE PCHOLD FORMAT SVG

http://www.adobe.com/svg/viewer/install/main.html

It's free, and In the modern world should be part of every companies automatic client management.

Install it, and test it with a single request using PCHOLD FORMAT SVG.

It is documented in one of the IB 5.3 docs.
April 07, 2005, 04:37 PM
<Pietro De Santis>
This part I know. This does not solve the PDF dilemma.
April 07, 2005, 04:55 PM
<JG>
IBI love to miss out the every day things that every body needs to know.
That's one of the reasons why the forum is so good.
In one of the betas for 53 there was originally an option for direct delivery of SVG to a PDF document, but it was dropped (I seem to remember from my early beta testing of it).

Perhaps a petition might get it back.
April 07, 2005, 06:46 PM
Prarie
Graphs will be the death of me...
SVG worked fine with the Car file...but not with my Graph...so got it to work with GIF format...but where does the Heading Go that was sitting nicely on my graph before??
If I go stick the Heading in my Dummy Report...it will not listen to HEADING CENTER...Wants to be ugly and shift to some weird place on the left.
April 07, 2005, 07:33 PM
Prarie
So the heading can be controlled by a Stylesheet in the dummy report, but all kinds of strange things happen to the Stylesheet within the Graph itself using this method.
May 03, 2005, 08:44 PM
N.Selph
I'm having a similar problem with a graph placed in a PDF report (GIF) graph. Confused What sort of funny things from the graph stylesheet did you see when you tried this? Did you eventually find any workarounds?
We are using 5.21 (old type graphing).
May 03, 2005, 09:12 PM
Prarie
Found out that any Heading, alignment or such in the Graph you started with, is out the window. I never got the results I wanted with GIF files, so used SVG, but of course unless you are on 5.3..this will not do you good. Had to do the Dummy report and then all the styling in the PDF Report, inserting the image created from the graph. Had to align each line of the Heading one by one.


ON TABLE SET STYLE *
TYPE=HEADING,LINE=1,JUSTIFY=LEFT,STYLE=BOLD,$
TYPE=HEADING,LINE=2,JUSTIFY=LEFT,STYLE=BOLD,$
TYPE=HEADING,LINE=3,JUSTIFY=RIGHT,STYLE=BOLD,$
TYPE=HEADING,LINE=4,JUSTIFY=RIGHT,STYLE=BOLD,$

TYPE=REPORT, IMAGE=GRAPH1.svg, POSITION=(0 0), SIZE=(7 5), ORIENTATION=LANDSCAPE, $
TYPE=REPORT, IMAGE=GRAPH2.svg, POSITION=(6 1), SIZE=(7 5),ORIENTATION=LANDSCAPE, $
ENDSTYLE
ON TABLE PCHOLD FORMAT PDF
END

If there was only one line...had to do that too.
TYPE=HEADING,LINE=1,JUSTIFY=CENTER,STYLE=BOLD,$

Not a happy experience.....

I don't know if anyone else has had better results. Frowner