Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Showing Grid question answers and printing them

1. I would like to print the responses given to the grid question. How to get labels of responses? I tried with ListLabel, but it return the list members label and not the answers given to each list member.

2. Then before submitting the survey I would like to print the above specified answers? Is it possible to add "Print" command button in Sawtooth?
asked May 21, 2013 by Lawrence Bronze (2,100 points)
retagged May 21, 2013 by Walter Williams
By "print" you mean send to the printer?
yes I need to print that specific page. We are taking survey from focus group and then we need to print specific questions result before submitting the survey.

1 Answer

0 votes
I found answers myself.

For item #1 :-

I have used the below code and it works.

<tr>
  <td> Attribute 1 </td>
  <td> [%LABEL(S10_R1)%] </td>
</tr>
<tr>
  <td> Attribute 2 </td>
  <td> [%LABEL(S10_R2)%]  </td>
</tr>
<tr>
  <td> Attribute 3 </td>
  <td> [% LABEL(S10_R3) %] </td>
</tr>
<tr>
  <td> Attribute 4 </td>
  <td> [% LABEL(S10_R4) %] </td>
</tr>


However, for the Grid based ranking question I couldn't get the label. So, I just displayed ranks in the numbers with little trick of showing the word "Rank" before the number display.

<tr>
  <td> Attribute 1 </td>
  <td> Rank&nbsp;[%(Q2_R1_C1) %] </td>
</tr>
<tr>
  <td> Attribute 2 </td>
  <td> Rank&nbsp;[%(Q2_R2_C1) %] </td>
</tr>
<tr>
  <td> Attribute 3 </td>
  <td> Rank&nbsp;[%(Q2_R3_C1) %] </td>
</tr>
<tr>
  <td> Attribute 4 </td>
  <td> Rank&nbsp;[% (Q2_R4_C1) %] </td>
</tr>


For item #2 :- Use the below any one set of code.

First code will show button below and on click event will take to the printer dialog box.

<html>
    <center>
         <head>
         <script>
         function printpage()
               {
                   window.print()
               }
         </script>
         </head>
         <body> 
         <input type="button" value="Print this page" onclick="printpage()">
        </body>
 </center>
 </html> 
 


The second set of code will automatically take the page to printer dialog after the page loading.

<script language="JavaScript">
<!--
window.print();
//-->
</script>
answered May 21, 2013 by Lawrence Bronze (2,100 points)
...