COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Parkavi15 on 21 Jul 2019 03:40:46 AM

Title: Reg: Query Service Internal Error when no values in the prompt is selected
Post by: Parkavi15 on 21 Jul 2019 03:40:46 AM
Hi,

I am working in an incident(already developed report), We do not have access to see the error log, I could only see "Query service internal error" for the below scenario,

Prompt1: selecting "dept"
Prompt 2(pdetail): Showing the static values for dept, "Parent vendor use value([Reporting View].[Vendor Hierarchy].[Parent Vnd Id]), vendor([Reporting View].[Vendor Hierarchy].[Dept Id + Vendor Id])"
1) When I am selecting Parent vendor in Prompt 2 and click "finish" without selecting anything in the prompt 3. I am getting the output as expected as "no data available"
2) but when I select Vendor and click "finish" without selecting anything in the prompt 3, I am getting an error instead of receiving "No data available". If i select anything in the prompt 3 too, I am getting an output as expected. Only when not selecting anything in the prompt 3. I am getting an error.

Note:
1. Prompt 3 use value for parent vendor is parent vendor ID but for vendor it is the concatenation of two fields(vendor id and dept id) happened in the framework level itself.
2. Did Root cause analysis and found the issue is one of the filter in the main report query, Please see below filter condition,
case #prompt('pDetail', 'string', 'null')#
       when ('[Reporting View].[Vendor Hierarchy].[Parent Vnd Id]') then ([Reporting View].[Vendor Hierarchy].[Parent Vnd Id] in (#promptmany('pProduct2', 'token', 'null')#))
       when ('[Reporting View].[Vendor Hierarchy].[Vendor Id]') then ([Reporting View].[Vendor Hierarchy].[Dept Id + Vendor Id] in (#promptmany('pProduct2', 'string', 'null')#))
    else (1 = 1)
end

The condition which is marked in orange is creating issue when prompt3(pproduct2) is not selected. At the same time, The condition works fine, when you select anything in the pproduct2.
Title: Re: Reg: Query Service Internal Error when no values in the prompt is selected
Post by: Parkavi15 on 21 Jul 2019 03:44:35 AM
One more thing, The concatenated field's query TRIM(BOTH FROM "A"."DEPT_NBR") || '/' || TRIM(BOTH FROM "B"."VND_NUMERIC_DESC") AS "Data_Item1"