search cancel

For a report based on SQL Query with parameters when Report Settings are applied SQL Query gets changed and line breaks cut.

book

Article ID: 162590

calendar_today

Updated On:

Products

Workflow Solution ServiceDesk

Issue/Introduction

For a report based on SQL Query with parameters when Report Settings are applied - parameter value changed - SQL Query gets changed and line breaks (plus adjacent spaces) get cut out. This will often result in query syntax breaking, report not returning any results and an error message displayed about incirrent syntax.

Incorrect syntax near '>'.

Cause

When query parameters are changed, query gets reapplied but line breaks and adjacent spaces get cut out. For example:

SELECT * FROM ReportProcess rp
INNER JOIN Task t ON rp.SessionID=t.SessionID
WHERE t.IsCompleted = @Complete

becomes

SELECT * FROM ReportProcess rpINNER JOIN Task t ON rp.SessionID=t.SessionIDWHERE t.IsCompleted = @Complete

Resolution

Symantec Engineering is working on the issue.

Workaround:

Remove line breaks manually from the query before pasting it into query field i.e. put entire query in one line.