Veröffentlicht am :
Reporting CREATION_INTERNE

Demonstration von ODS-Escape-Zeichen

Dieser Code ist auch verfügbar auf: English Español Français
Wartet auf Validierung
Dieses Programm erstellt einen Datensatz, der Zeichenfolgen mit Formatierungs-Tags (hochgestellt, tiefgestellt) enthält. Es konfiguriert anschließend mehrere ODS-Ziele (HTML, Excel, RTF, PDF) und definiert ein Escape-Zeichen (^) zur Interpretation dieser Tags. Es verwendet PROC PRINT, um die Daten mit formatierten Titeln und Fußnoten anzuzeigen.
Datenanalyse

Type : CREATION_INTERNE


Die Daten werden direkt im Data Step 'sup_sub' generiert.

1 Codeblock
DATA STEP Data
Erklärung :
Erstellung der Tabelle 'sup_sub', die Textbeispiele mit ODS-Formatierungs-Tags (z. B. ^{super 2}, ^{sub 8}) enthält.
Kopiert!
1DATA sup_sub;
2 LENGTH myvar $200;
3 myvar = "Pythagorean Theorem: a^{super 2} + b^{super 2} = c^{super 2}";
4 OUTPUT;
5 myvar = "This is something that needs a footnote. ^{super 1}";
6 OUTPUT;
7 myvar = "Macbeth: 'Is this a dagger I see before me?' ^{dagger}";
8 OUTPUT;
9 myvar = "The Caffeine molecule is an alkaloid of the methylxanthine family: " ||
10 "C^{sub 8}H^{sub 10}N^{sub 4}O^{sub 2}";
11 OUTPUT;
12RUN;
2 Codeblock
PROC PRINT
Erklärung :
Konfiguration der ODS-Ausgaben und des Escape-Zeichens '^'. Definition komplexer Fußnoten, die dieses Zeichen zur Formatierung verwenden. Ausführung von PROC PRINT zur Erstellung des Berichts in den angegebenen Dateien.
Kopiert!
1ods html file='inline2.html' style=sasweb;
2ods html3 file='inline2.xls' style=sasweb;
3ods rtf file='inline2.rtf' notoc_data;
4ods pdf file='inline2.pdf';
5 
6ods escapechar='^';
7 
8footnote1 j=l "Note. Data include persons with a diagnosis of HIV infection regardless of stage of disease at diagnosis.";
9footnote2 j=l "^{super a}Estimated numbers resulted from statistical adjustment that accounted for reporting delays and missing risk-factor information, but not for incomplete reporting. Rates are per 100,000 population. Rates are not calculated by transmission category because of the lack of denominator data.";
10footnote3 j=l "^{super b}Hispanics/Latinos can be of any race.";
11footnote4 j=l "^{super c}Heterosexual contact with a person known to have, or to be at high risk for, HIV infection. ";
12footnote5 j=l "^{super d}Includes hemophilia, blood transfusion, perinatal exposure, and risk factor not reported or not identified. ";
13footnote6 j=l "^{super e}Includes hemophilia, blood transfusion, and risk factor not reported or not identified. ";
14footnote7 j=l "^{super f}Because column totals for estimated numbers were calculated independently of the values for the subpopulations, the values in each column may not sum to the column total.";
15 
16PROC PRINT DATA=sup_sub;
17 title j=r 'PDF & RTF: Page ^{thispage} of ^{lastpage}';
18 title2 j=c 'RTF only: ^{pageof}';
19RUN;
20 
21ods _all_ close;
Dieses Material wird von We Are Cas "wie besehen" zur Verfügung gestellt. Es gibt keine ausdrücklichen oder stillschweigenden Garantien hinsichtlich der Marktgängigkeit oder Eignung für einen bestimmten Zweck in Bezug auf die hierin enthaltenen Materialien oder Codes. We Are Cas ist nicht verantwortlich für Fehler in diesem Material, wie es jetzt existiert oder existieren wird, noch bietet We Are Cas technischen Support dafür an.