03-19-2025
renee_njc
Fluorite | Level 6
Member since
02-21-2025
- 5 Posts
- 0 Likes Given
- 0 Solutions
- 1 Likes Received
-
Latest posts by renee_njc
Subject Views Posted 426 03-18-2025 10:39 PM 1169 02-25-2025 09:15 PM 1228 02-24-2025 11:38 PM 1251 02-24-2025 08:45 PM 1392 02-21-2025 04:37 AM -
Activity Feed for renee_njc
- Posted Re: How to remove the hyperlink from the title of TOC in PDF on SAS Programming. 03-18-2025 10:39 PM
- Posted Re: How to remove the hyperlink from the title of TOC in PDF on SAS Programming. 02-25-2025 09:15 PM
- Posted Re: How to remove the hyperlink from the title of TOC in PDF on SAS Programming. 02-24-2025 11:38 PM
- Posted Re: How to remove the hyperlink from the title of TOC in PDF on SAS Programming. 02-24-2025 08:45 PM
- Got a Like for How to remove the hyperlink from the title of TOC in PDF. 02-23-2025 09:17 AM
- Posted How to remove the hyperlink from the title of TOC in PDF on SAS Programming. 02-21-2025 04:37 AM
-
My Liked Posts
Subject Likes Posted 1 02-21-2025 04:37 AM
03-18-2025
10:39 PM
Hi Tom, I tried the CSS style and it doesn't work. The hyperlink is still there. Here is my CSS style: .body, .systemtitle, .header, .data {
font-family: Courier New;
}
.body {
color: black;
background-color: white;
border: solid black 0.1px;
margin-bottom: 0.77in;
margin-left: 1.34in;
margin-right: 1.34in;
margin-top: 0.77in;
}
.data
{
color: black;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
border-width: 0.1em 0 0.1pt 0;
}
.table
{
background-color: #FFFFFF;
border-collapse: collapse;
border-bottom-width: 0.1pt;
border-collapse: separate;
border-color: none;
border-left-width: 0px;
border-right-width: 0px;
border-spacing: 0pt;
border-style: solid;
border-top-width: 0.1pt;
color: black;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
text-align: center;
margin-bottom: 0.77in;
margin-left: 1.34in;
margin-right: 1.34in;
margin-top: 0.77in;
}
.header
{
border-collapse: collapse;
border-bottom-width: 0.1pt;
border-collapse: separate;
border-color: none;
border-left-width: 0px;
border-right-width: 0px;
border-spacing: 0pt;
border-style: solid;
border-top-width: 0.1pt;
background-color: #FFFFFF;
color: #000000;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
}
.systemtitle
{
color: #000000;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
background-color: none;
}
.systemfooter
{
background-color: #FFFFFF;
color: #000000;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
}
.contents
{
background-color: #FFFFFF;
color: blue;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
list-style-type: decimal;
margin-left: 0px;
margin-right: 0px;
}
.contents
{
list-style-type: square;
pointer-events: none;
}
.contenttitle
{
color: green;
font-family: 'Courier New';
font-size: 12pt;
font-style: normal;
font-weight: bold;
margin-bottom: 4em;
margin-left: 1em;
margin-right: 1em;
margin-top: 4em;
text-align: center;
width: 100%;
background-color:aqua;
pointer-events: none;
}
.contentproclabel
{
color: blue;
font-family: 'Courier New';
font-size: 8pt;
font-style: normal;
font-weight: normal;
list-style-type: decimal;
margin-left: 0in;
margin-right: 0in;
}
.contentitem
{
color: red;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
list-style-type: none;
margin-left: 15%;
margin-right: 15%;
}
.contentfolder
{
color: purple;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
list-style-type: none;
margin-left: 15%;
margin-right: 15%;
}
.usertext
{
background-color: #FFFFFF;
color: yellow;
font-family: 'Courier New';
font-size: 9pt;
font-style: normal;
font-weight: normal;
pointer-events: none;
}
Here is my SAS code to generate the output: filename ncss "mypath./testt.css";
proc template;
define style styles.mycssstyle;
import ncss;
end;
define style styles.mycssstyleprinter;
parent=styles.mycssstyle;
import ncss print;
class contenttitle/
pretext = "TAT";
end;
run;
ods pdf file="&outdir./test.pdf" style=styles.mycssstyleprinter contents = yes ;
ods proclabel = "TEST1";
title "test1";
proc report data=sashelp.class(obs=10);
run;
ods proclabel = "TEST2";
title "test2";
proc report data=sashelp.class(obs=20);
run;
ods _all_ close;
ods pdf file="&outdir./test.pdf" style=styles.mycssstyleprinter contents = yes ;
ods proclabel = "TEST1";
title "test1";
proc report data=sashelp.class(obs=10);
run;
ods proclabel = "TEST2";
title "test2";
proc report data=sashelp.class(obs=20);
run;
ods _all_ close; I have tried the code you posted. It doesn't work either.
... View more
02-25-2025
09:15 PM
Yes, so I am ok with the hyperlink in the contents of TOC (the red part in the screenshot). I want to remove the hyperlink from the words of "Table on Contents" (the yellow part in the screenshot). Is there any way to do that?
... View more
02-24-2025
11:38 PM
The hyperlink in the "Table of Contents" is linked to the first file. I tried the simple code and the hyperlink still exists. %let outdir = C:/User/temp;
ods pdf file="&outdir./test.pdf" style=stlpdf contents = yes ;
proc report data=sashelp.class(obs=10);
run;
proc report data=sashelp.class(obs=20);
run;
ods pdf close;
... View more
02-24-2025
08:45 PM
The code I used is blow: /*Create table and save it to ods document as temp file*/ ods document name=work.temp(write) ; ods listing close; proc report data=tfl.file1 nowd headline center missing split='^' spacing=0 contents=""; by pg; column pg ord1-ord4 col0 col0_1 col1-col3 margin; define pg/ order noprint; define ord1/ order=internal noprint; define ord2/ order=internal noprint; define ord3/ order=internal noprint; define ord4/ order=internal noprint; define col0 / display "Disposition" style(header)=[just=left] style(column)=[just=left cellwidth=4.5in] flow; define col0_1 / display "Statistic" style(header)=[just=left] style(column)=[just=left cellwidth=.7in] flow; define col1 / display "A" style(header)=[just=c] style(column)=[just=c cellwidth=1in] flow; define col2 / display "B" style(header)=[just=c] style(column)=[just=c cellwidth=1in] flow; define col3 / display "Total" style(header)=[just=c] style(column)=[just=c cellwidth=1in] flow; define margin/ display noprint; break before pg / page contents=""; compute margin; if margin=1 then call define("col0", "style", "style=[leftmargin=.14in]"); if margin=2 then call define("col0", "style", "style=[leftmargin=.28in]"); endcomp; %long_foot; run; ods document close; ods listing; /*Keep bookmark in the first page only.*/ %global tpg; %macro doc; proc document; doc; doc name = work.temp; list/levels=all; run; quit; %if &tt4. ne %then %do; proc document name=work.temp(update); make \first;dir \first#1; setlabel\first#1 "%sysfunc(strip(&tt1)) %sysfunc(strip(&tt2)) %sysfunc(strip(&tt3)) - %sysfunc(strip(&tt4))"; %do z=1 %to &tpg.; copy \Report#1\ByGroup&z.#1\Report#1 to ^; %end; run; quit; %end; %else %do; proc document name=work.temp(update); make \first;dir \first#1; setlabel\first#1 "%sysfunc(strip(&tt1)) %sysfunc(strip(&tt2)) - %sysfunc(strip(&tt3))"; %do z=1 %to &tpg.; copy \Report#1\ByGroup&z.#1\Report#1 to ^; %end; run; quit; %end; %symdel tt1 tt2 tt3 tt4; %mend doc; %doc; ods listing close; /*Output table*/ ods document name=tfl.&outfile.(write) ; ods rtf file="&outdir./file1.rtf" style=stlrtf startpage=yes; ods pdf file="&outdir./file1.pdf" style=stlpdf startpage=yes; proc document name=work.temp(update); replay\first ; run; quit; ods _all_ close; The file2 was created using the same code but different dataset. Thanks.
... View more
02-21-2025
04:37 AM
1 Like
When creating the printable TOC page in PDF, there is a hyperlink in the TOC title. I tried to update the proc template but it doesn't work. Is there any way to remove the hyperlink from the TOC title? Thanks! My code for creating the PDF file is: proc template; define style stlpdfx; parent=styles.pearl; class ContentTitle from ContentTitle / fontweight = bold color=dark blue margintop=12pt pretext='My Customized Title' ; end; run; ods _all_ close; options pageno=2; ods pdf file="&outdir./testfile.pdf" style=stlpdfx contents = yes; proc document name=tfl.file1; replay; run; proc document name=tfl.file2; replay; run; quit; ods pdf close; ODS LISTING;
... View more