Skip to main content
Question

Problem with Report Generation in FSM Web Client Due to Multiple Select Parameters at the Screen Level

  • 7 June 2024
  • 2 replies
  • 40 views

Hi Team,

I've created a customized screen with additional buttons for report printing through client scripts. When passing a single value, the report generates correctly. However, an internal server error occurs when multiple selected values are passed.

For reference, added a screenshot below 

Thanks in advance

Venkat

2 replies

Userlevel 7
Badge +26

Hi @venkatesh 

Please share the script as well.

Cheers!

Userlevel 2
Badge +4

@venkatesh, i believe you are trying to pass multiple values to same parameter (OR function),

if so, to get the correct report, you need to format your script as the following example.

(Below example is used in a button where it generates report for all the tasks inside a request)

 

var taskRows = getDataTableRows('task');
var reportParam = 'TaskID=';

for (var rowIndex = 0; rowIndex < size(taskRows); ++rowIndex)
{
var resultRow = taskRows[rowIndex];
var taskId = resultRow.data['task.task_id'];

if(rowIndex ==0) {
reportParam = reportParam + taskId;
}
else {
reportParam = reportParam + " || " + taskId;
}
}

reportParam = reportParam + "&TaskID__OPERATOR__=IN";

printReport('TASK', reportParam, 'PDF');

//Output format needs to be in the following format and it needs to have a operator specified
//printReport('TASK', 'TaskID=282 || 270&TaskID__OPERATOR__=IN', 'PDF');

 

Reply