External parameters not working for reports after update to 6.7.2

Hi

External parameters not working for reports after update to 6.7.2

I am using

  reportParams.put("message1", "my Message");

now this parameter is not passed to bands automatically

Please help

Hi George,

Could you provide sample application for the error?
I tried the following code:

Report report = dataManager.load(new LoadContext<>(Report.class)
                        .setId(UUID.fromString("3b2a600e-65d2-7816-d796-25842f1efc82"))
                        .setView(View.LOCAL));
Map<String, Object> params = new HashMap<>();
params.put("name1", "5");
reportGuiManager.printReport(report, params);

Parameter is passed to the JPQL band.

Thanks,
Andrey Subbotin

I am not sure if I should start another topic or not but I am having an issue with report parameters after the upgrade as well.

Our reports are expecting an instance of an Entity as a parameter and the report does not seem to be getting the instance reference. This happens from both our custom code and when using the built in Run Report screen which opens the instance selection dialog. After selecting the desired instance the report renders correctly but everything is blank, including fields set directly from the header band which is defined as a list of instances. This issue only started after the update to 6.7.2.

If this issue should go into its own topic let me know and I will move it.

Thank you,
Corey Amoruso

Here’s more detail on the breaking change:

I have a headerBand that takes a list of entities as an input parameter and an HTML template rendering to a PDF like this:

<!doctype html>
<html>
	<!--Assign the bands to variables-->
	<#assign headerBand = Root.bands.headerBand>
<head>
	<title> Work Order Details </title>
	<meta charset="UTF-8"/>
	<style type="text/css">
		p {
			color:black;
			margin: 3px;
			font-size:10pt;
			font-family:Tahoma;
			font-weight:bold;
		}
		table{
			border-collapse: collapse;
			margin:5pt;
		}
		table, th, td{
			font-size:8pt;
			font-family:Tahoma
		}
		th{
			text-align:right;
			border-width: thin;
			border-style: solid;
			border-color: black;
			padding-left:5pt;
			padding-right:2pt;
			width:35%;
		}
		td{
			padding:2pt;
			border-width: thin;
			border-style: solid;
			border-color: black;
		}
		<!--setup paging module-->
		body{
			line-height: 1.3;
		}
		@page{
			size: landscape;
			margin: 0.5in;
			@bottom-left{
				font-size: 10pt;
				font-family: Calibri;
				content: "${headerBand[0].bands.date[0].fields.date}"
			}
			@bottom-center{
				font-size: 14pt;
				font-family:Avant Garde;
				color: #324eab;
				content: "Test";
			}
			@bottom-right{
				font-size: 10pt;
				font-family: Calibri;
				content: counter(page) " of " counter(pages);
			}
		}
	</style>
</head>
<body>
<div style="width:960px;">
	<!--Header section-->
	<Header>
		<h1 style="color:#324eab;font-size:18pt;font-family: Calibri;">Work Order Details</h1>
	</Header>
	<#list headerBand as parentWO>
	<#if parentWO?has_next>
		<div style="page-break-after: always; margin-bottom:20px;">
	<#else>
		<div style="page-break-after: auto; margin-bottom:20px;">
	</#if>
		<!--Work Order Number-->
		<p>Work Order: ${parentWO.fields.workOrderId}</p>
		<!--Header Tables-->
		<table style="width:30%;float:left">
			<tr>
				<th>Reference ID:</th>
				<td>${parentWO.fields.referenceId}</td>
			</tr>
			<tr>
				<th>Description:</th>
				<td>${parentWO.fields.description}</td>
			</tr>
			<tr/>
	</table>
		<table style="width:30%;float:left">
			<tr>
				<th style="align:right">Status:</th>
				<td>${parentWO.fields.state}</td>
			</tr>
			<tr>
				<th>Parent:</th>
				<#if parentWO.fields.parent?has_content>
					<td>${parentWO.fields.parent.workOrderId}</td>
				<#else>
					<td/>
				</#if>
			</tr>
			<tr>
				<th>Parent Desc:</th>
				<#if parentWO.fields.parent?has_content>
					<td>${parentWO.fields.parent.description}</td>
				<#else>
					<td/>
				</#if>
			</tr>
		</table>
		<br style="clear:both" />
	</div>
	</#list>
</div>
</body>
</html>

No matter what I do, I can’t get data to appear. This has only been since the 6.7 upgrade.

Hi Corey,

Could you provide sample application with error?

Thanks,
Andrey

Andrey,

I’ve attached a link to a modified Order Management demo. I have created a simple report taking a list of Products as a parameter. Upon running the report you will see that no data is displayed as if no instance was passed in to the template.

Corey Amoruso

Hi Corey,

Thank you for a sample project. We have created an issue https://youtrack.cuba-platform.com/issue/PL-10056.
We plan to fix it in the next bugfix release of 6.7.

Andrey Subbotin

Hi,
The issue is fixed in the platform version 6.7.3.