Dear Community,
I am generating a .rtf file with several pages. Among other Outputs there are graphics generated by the SGRENDER procedure (with modified templates) in this document. While developing the templates i always took a look in the HTML Viewer if they look how i want them to look. Once the result was satisfying i transfered the graphics in the RTF document. Following the difference in layout:
HTML Results Viewer
In the RTF file:
You can see that the linesize is different.... not how i defined it in the template. HOW can i modify the underlying Options which cause different linesizes on RTF file?
- does it have sth. to do with rtf-tag sets?
here is some code:
proc template;
define statgraph temp_5_1;
[.... several definitions ... ]
discretelegend 'bar_5_1' 'timeline_5_1'/ LOCATION= INSIDE HALIGN = RIGHT VALIGN = TOP ACROSS = 1 opaque=false ; /* following is to determine which reference-lines to draw. */
referenceline x=2 / lineattrs=(color=black pattern = Dash THICKNESS=7 ) /*curvelabel="normal DE"*/ CURVELABELLOCATION = OUTSIDE CURVELABELPOSITION = MAX DISCRETEOFFSET=+0.5;
referenceline x=3 / lineattrs=(color=black pattern = Dash THICKNESS=2 ) curvelabel="°" CURVELABELLOCATION = OUTSIDE CURVELABELPOSITION = MAX DISCRETEOFFSET=+0.5;
endlayout;
entryfootnote halign=right textattrs=(weight=bold size=8pt)"°Countries performing extended data-entry in Argus.";
endgraph;
end;
run;
PROC TEMPLATE;
DEFINE STYLE dummy;
PARENT = styles.rtf;
STYLE body from document /
protectspecialchars = off;
STYLE table from output /
bordertopstyle = NONE
borderwidth = 0.025cm
rules = NONE
frame = VOID
padding = 0.1cm
cellpadding = 0cm
/* width = 100% */
textalign = left;
STYLE fonts /
'FixedFont' = ("Times New Roman",9pt,bold)
'BatchFixedFont' = ("Times New Roman",6.7pt,bold)
'FixedHeadingFont' = ("Times New Roman",9pt,bold)
'FixedStrongFont' = ("Times New Roman",9pt,bold)
'FixedEmphasisFont' = ("Times New Roman",9pt,bold)
'footFont' = ("Times New Roman",9pt)
'docFont' = ("Times New Roman",9pt)
'headingFont' = ("Times New Roman",9pt,bold)
'headingEmphasisFont' = ("Times New Roman",10pt,bold)
'EmphasisFont' = ("Times New Roman",9pt,bold)
'StrongFont' = ("Times New Roman",9pt,bold)
'TitleFont2' = ("Times New Roman",9pt)
'TitleFont' = ("Times New Roman",9pt);
STYLE color_list /
'bg' = white
'fg' = black
'bgH' = white
'link' = blue;
END;
RUN;
FILENAME rtfout "Name.rtf" LRECL = 100000;
ODS RESULTS = OFF;
/*ODS LISTING CLOSE;*/
ODS TAGSETS.rtfDS_CSPV_tag
FILE = rtfout
UNIFORM
/* NOGTITLE*/
NOGFOOTNOTE
OPTIONS(TOC_DATA= "ON" CONTENTS = "YES" SECT= "NONE");
OPTIONS NOQUOTELENMAX;
[viel viel code]
/*erzeugen der Grafik*/
ods graphics on / height=11cm;
proc sgrender data=WORK.LsoAf_grouped_s template=temp_5_1;
dynamic [....];
run;
ODS _ALL_ CLOSE;
Maybe it's the part with the Dummy template? How can i change the Option defining the line-styles of the graph?
Thank you in advance & best regards,
Felix
I don't see anyplace in that code where you are specifying the use of the style dummy.
By default each output destination defaults to a different style and without something like
Ods html style=styles.dummy;
or
ods tagsets.rtfDS_CSPV_tag style=styles.dummy;
the default ODS style for the destination will be used.
Also the line thickness attribute when a unit of measure is not used will default to different measures depending on ODS destination.
You might try setting a unit like PT or cm for the line attribute so each destination has a chance of having the same thickness.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.