Detached Object problem when running a Report

I am getting the familiar error (IllegalStateException: Cannot get unfetched attribute [product] from detached object com.company.application.Application-…[detached]), and the product attribute is checked in the Application view.

This problem only occurs when I attempt to run a report with the following html template.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- saved from url=(0153)http://localhost:8080/app/APP/connector/0/13/view-1ffa56a6-fb7f-4b89-b549-8895ec07710c/Template+for+report+%22Report+for+entity+%22Application%22%22.html -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title> Report for entity "Application" </title>
        <style type="text/css">
             body  {font-family: 'Charis SIL', sans-serif;}
 tbody tr {height:20px; min-height:20px}

        </style>
    </head>
    <body>
        
<#assign Applications = Root.bands.Applications><br>
<#setting boolean_format="True,False">


<#if Applications?has_content>
<#list Applications as row>
<table class="report-table" border="1" cellspacing="0">
<thead>
<tr>
<th>Created At</th>
<th>Detail</th>
<th>Score</th>
<th>Status</th>
<th>Auto</th>
</tr>
</thead>
<tbody><tr>
<td> <#if  row.fields('createTs')?has_content>${row.fields('createTs')?string("MM/dd/yyyy")}<!--#if--> </td>
<td> ${(row.fields('detail'))!?string!} </td>
<td> ${(row.fields('score'))!?string!} </td>
<td> ${(row.fields('status'))!?string!} </td>
<td> ${(row.fields('auto'))!?string!} </td>
</tr>
<!--#list-->
<!--#if-->
</tbody>
</table>


    
<div style="display: none; color: white; text-align: center; position: fixed; top: 0px; left: 0px; width: 100%; height: auto; min-width: 100%; min-height: auto; max-width: 100%; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, Geneva, sans-serif; cursor: pointer; padding: 5px; background-color: rgb(255, 143, 0);"><span style="color: white; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, Geneva, sans-serif;">You have turned off the paragraph player. You can turn it on again from the options page.</span><img src="chrome-extension://gfjopfpjmkcfgjpogepmdjmcnihfpokn/img/icons/icon-close_16.png" style="width: 20px; height: auto; min-width: 20px; min-height: auto; max-width: 20px; float: right; margin-right: 10px;"></div></body></html> 

Clearly, I’m misunderstanding something. Can you help me out?

Hi

Unfortunately, we are unable to reproduce the problem by the description.
But it seems, it does not depend on the template.

Could you prepare a little project which illustrates the problem and share it here? You can zip the project by running the zipProject gradle task.

Also export and share the report (the “Export” button is located on Reports->Reports).