BookmarkSubscribeRSS Feed
nupedoc79
Fluorite | Level 6

In the attached excel spreadsheet I've store a path to a checkbox image ie

"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";

Basically Tabel3 will contain the above information. I expect the below on the PDF. This doesn't appear to be a syntax issue,

but i could be mistaken. Any suggestions would be appreciated.

 

What I expect is:

checkbox image Normal

checkbox image Abnormal

checkbox image Normal

etc.

 

What I'm gettting is:

"Normal";

"Abnormal_____";

etc.

 

The SAS CODE:

 

ods region x=5.0in y=1.5in;

 

proc report data = pg2tabl3 out=testfile nowindows nowd

style(report)=[rules=none frame=void cellspacing=0 cellpadding=1pt just=l fontsize=3pt]

style(header)=[background=white font_weight=bold just=l font_size=5pt];

column table3;

define table3 / '* (Mandatory - Complete at least one system)' style(column)=[cellwidth=3.0in] ;

rbreak after / summarize;

compute table3;

if table3 ^= ' ' then

call define (_row_, 'Style', 'style= [font_size=9pt vjust=middle cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

if table3 ^= ' ' then

call define (_row_, 'Style', 'Style= [font_size=9pt vjust=center cellwidth=3.0in ]');

endcomp;

Run;

 

 

 

 

5 REPLIES 5
ballardw
Super User

Are you expecting to get an actual Image or the text "checkbox image Normal"?

 

I do not see anything in that Proc Report code that references any images.

 

 

 

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

 

If you want to post example data best is a datastep. You can generate that by following the information in this link.

nupedoc79
Fluorite | Level 6

I'm expecting a a graphic checkbox next to the words Normal and Abnormal. The variable Table3 on the Proc Report will translated to each of the style statements. The style statements are stored in the sas dataset reference in the Proc Report logic.

nupedoc79
Fluorite | Level 6

Thanks for the reply.  The excel file contains the below statements which are stored in the SAS dataset referenced in the Proc Report statemtent.

Table3
Blood Pressure _______________________ Pulse________ Temp_______F/C         Weight _____lb/kg  Height ________in/cm BMI____________    
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
"^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Normal}";
 "^{style [ preimage='\\leto\Health Services\Revenue Management\Risk Analytics\Care\PA\2016\Models\Dev-AA\BH\Logo\checkboxv1.png']Abnormal______}";
ballardw
Super User

Instead of many repeats of a JPG how about inserting a UNICODE 2610 character?

Cynthia_sas
SAS Super FREQ

Hi,
 Also, you do not show your ODS statements -- I suspect you are using ODS EXCEL because TAGSETS.EXCELXP does not use images. But you could also use ODS HTML or ODS MSOFFICE2K, so without more information about your destination, it is hard to tell.

Also, you are using an ESCAPECHAR function but do not show your ODS ESCAPECHAR statement:
ods escapechar='^';

Last, the reason your destination matters is that you have to be sure that your destination supports both ESCAPECHAR and PREIMAGE. So this might be a question for Tech Support. At this point, no one can test similar code because your ODS destination is unknown.

cynthia

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1134 views
  • 0 likes
  • 3 in conversation