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;
|
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.
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.
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______}"; |
Instead of many repeats of a JPG how about inserting a UNICODE 2610 character?
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.