<% if action_name == 'print_survey_result' && @survey.recur %>
  <table>
    <tr>
      <th style="text-align: left"><%= l(:label_clos_responses) %></th>
      <td><%= params[:groupName].present? ? params[:groupName] : (params[:groupName].blank? && validateERPPermission("E_SUR")) ? "" : getResponseGroup.last %></td>
    </tr>
    <% if  params[:groupName].present? && @groupClosedDate.present? %>
      <tr>
        <th style="text-align: left"><%= l(:label_closed_date) %></th>
        <td><%= @groupClosedDate&.to_date %></td>
      </tr>
    <% end %>
  </table>
<% end %>

<div>
  <% @survey_result_Entries.each do |entry| %>
    <fieldset class="box tabular">
      <table class="odd-even">
        <tr><th align="left"><%= entry.question_name %></th></tr>
        <tr>
          <td><%= render :partial => 'graph', :locals => { :entry => entry } if (validateTrendingChart(entry.survey_id, entry.id) || params[:groupName] != 'trendChart') %></td>
          <th style="padding-left: 300px; font-size: 96px;" id="avgScore_<%= entry.id %>"></th>
        <tr>
      </table>
    </fieldset>
  <% end %>
</div>
<div>
  <% @survey_txt_questions.each do |qn_entry| %>
    <fieldset class="box tabular">
      <table>
        <tr><th align="left" style="white-space: nowrap"><%= qn_entry.question_name %></th></tr>
        <% @survey_txt_answers.each do |ans_entry| %>
          <% if qn_entry.question_id == ans_entry.question_id %>
            <tr><td style="padding-left: 50px;"><%= ans_entry.choice_text %></td><tr>
          <% end %>
        <% end %>
      </table>
    </fieldset>
  <% end %>
</div>