The SAS Output Delivery System and reporting techniques

checkbox in rtf report

Reply
New Contributor
Posts: 3

checkbox in rtf report

Hi All,

I am trying to create a report (rtf) which includes a checkbox. The user checks (tick) this box or leaves it blank.

Is there an option/way in SAS to create this checkbox ?

Thank you

SAS Super FREQ
Posts: 8,819

Re: checkbox in rtf report

Hi:

  Have you checked the RTF specification? I am not sure that the RTF spec includes any support for a checkbox like an HTML form. When ODS RTF creates a file, it creates RTF (Rich Text Formatting) control codes around the SAS report output. So, would you have a checkbox on each row of an output report? What would happen when the user checks the box? SAS can't read the RTF file back into a dataset? So it's not clear what you want to create Report document or some kind of form or even if RTF can do a check box. This would be a question for Tech Support.

cynthia

New Contributor
Posts: 3

Re: checkbox in rtf report

Hi Cynthia,

  Thanks for your response. I am creating a validation report.

  I am reading an excel (which contains TL titles) and then create report in rtf format displaying all these records in details. this part is fairly simple

 

What I want to be able to do is add a last page to this report containing a little summary like

All SDTM datasets validated                          (a checkbox here) Yes                 (a checkbox here) NA

All ADaM datasets validated                         (a checkbox here) Yes                 (a checkbox here) NA

so whoever signs off on the final report clicks the appropriate checkbox.

Hope I was clearly able to explain what I'm trying to do.

Thanks.

SAS Super FREQ
Posts: 8,819

Re: checkbox in rtf report

Hi:

  If this is just a manual checkbox -- not an online form, then one approach is to use a 3 or 4 character variable with a fixed value for the checkbox: |_| or |__| (pipe-underscore-pipe or pipe-underscore-underscore-pipe) and then you can just write it out as you would any other variable value. Or as an alternative, if you can find a Wingding symbol or some other symbol in a font that you have, then you can just use that symbol in place of the checkbox.

Cynthia


data signhere(keep=linenum line ckbox3 yes ckbox4 na);
length line $50 ckbox3 $3 ckbox4 $4;
  linenum = 1;
  Line ="All SDTM datasets validated";
  ckbox3 = "|_|";
  yes='Yes';
  ckbox4 = "|__|";
  na = 'NA';               
  output;
  linenum = 2;
  line = "All ADaM datasets validated";
  output;
run;
 
ods rtf file="c:\temp\ckbox.rtf";
 
proc report data=signhere nowd noheader
   style(report)={width=100% rules=none frame=void cellspacing=0};
  title 'Make Fake Checkboxes';
  title2;
  title3;
  footnote 'Sign Here';
  column linenum line ckbox3 yes ckbox4 na;
  define linenum / order noprint;
  define line / style(column)={fontweight=bold font_size=14pt};
  define ckbox3 / style(column)={fontweight=bold font_size=14pt font_face='Courier New'};
  define yes / style(column)={fontweight=bold font_size=14pt};
  define ckbox4 / style(column)={fontweight=bold font_size=14pt font_face='Courier New'};
  define na / style(column)={fontweight=bold font_size=14pt};
run;

ods rtf close;
title;
footnote;


make_fake_checkbox.png
New Contributor
Posts: 3

Re: checkbox in rtf report

Thank you Cynthia!

Ask a Question
Discussion stats
  • 4 replies
  • 1288 views
  • 3 likes
  • 2 in conversation