IBM Cognos FM测试总行返回2行,但当测试样本仅返回1行时

时间:2017-03-31 07:03:03

标签: database oracle cognos cognos-10 cognos-bi

我遇到了IBM cognos框架的问题。当我测试样本时,它返回的结果不是真的,只返回了1行。虽然数据库中的表有2行,但当我测试总行时,它也返回2行。

At database

At cognos framework

以下是ibm cognos框架管理器的查询信息:

-<response>
 <connectionID value="QFSID_2"/>
-<queryFeedbackResult>
 <property name="nativeCommandText"queryName="rsdfmQuery">WITH
  MEMBER [Measures].[XQE_NULL_CM0] AS 'NULL', SOLVE_ORDER = 65535
SELECT 
  [Dimensional Model_Dim - Customer].[Customer].[Customer].MEMBERS DIMENSION PROPERTIES PARENT_LEVEL,  PARENT_UNIQUE_NAME,  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Anchor Id],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer (Caption)],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Effective Date],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Number],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Custumer Type Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Custumer Type Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Identification Number],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Identification Type Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Industry Classification Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Industry Classification Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Postal Address],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Primary Branch Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Primary Branch Name] ON AXIS(0), 
  {[Measures].[XQE_NULL_CM0]} DIMENSION PROPERTIES PARENT_LEVEL,  PARENT_UNIQUE_NAME ON AXIS(1)
FROM [Database]  CELL PROPERTIES CELL_ORDINAL,  FORMAT_STRING,  VALUE
</property>
 <property name="CognosCommandText"queryName="rsdfmQuery"/>
-<property name="connections"qualifiedDS="true"queryName="rsdfmQuery">
 <connection modelDSName="ORA_TPBDWH_PoC.DMT"schema="TPB_DMT"value="ORA_TPBDWH_PoC"/>
 </property>
-<property name="columnList"queryName="rsdfmQuery">
-<columnList>
 <item length="-1"name="Customer (All)"nullsAllowed="true"precision="0"scale="0"sqlName="Customer (All)"type="string"/>
 <item length="20"name="Anchor Id"nullsAllowed="true"precision="38"scale="0"sqlName="Anchor Id"type="decimal"/>
 <item length="514"name="Customer Name"nullsAllowed="true"precision="256"scale="0"sqlName="Customer Name"type="varchar"/>
 <item length="560"name="Customer (Caption)"nullsAllowed="true"precision="279"scale="0"sqlName="Customer (Caption)"type="varchar"/>
 <item length="42"name="Customer Number"nullsAllowed="true"precision="20"scale="0"sqlName="Customer Number"type="varchar"/>
 <item length="12"name="Customer Effective Date"nullsAllowed="true"precision="0"scale="0"sqlName="Customer Effective Date"type="timestamp"/>
 <item length="62"name="Primary Branch Code"nullsAllowed="true"precision="30"scale="0"sqlName="Primary Branch Code"type="varchar"/>
 <item length="514"name="Primary Branch Name"nullsAllowed="true"precision="256"scale="0"sqlName="Primary Branch Name"type="varchar"/>
 <item length="62"name="Identification Type Code"nullsAllowed="true"precision="30"scale="0"sqlName="Identification Type Code"type="varchar"/>
 <item length="514"name="Identification Number"nullsAllowed="true"precision="256"scale="0"sqlName="Identification Number"type="varchar"/>
 <item length="62"name="Industry Classification Code"nullsAllowed="true"precision="30"scale="0"sqlName="Industry Classification Code"type="varchar"/>
 <item length="514"name="Industry Classification Name"nullsAllowed="true"precision="256"scale="0"sqlName="Industry Classification Name"type="varchar"/>
 <item length="514"name="Postal Address"nullsAllowed="true"precision="256"scale="0"sqlName="Postal Address"type="varchar"/>
 <item length="62"name="Custumer Type Code"nullsAllowed="true"precision="30"scale="0"sqlName="Custumer Type Code"type="varchar"/>
 <item length="514"name="Custumer Type Name"nullsAllowed="true"precision="256"scale="0"sqlName="Custumer Type Name"type="varchar"/>
 </columnList>
 </property>
 </queryFeedbackResult>
-<messageFolder>
 <message severity="information"title="XQE Message"type="planningStats">XQE-WRN-0056 The option autoSummary="false" is not supported by DMR; it will be interpreted as autoSummary="true".
</message>
-<messageFolder>
 <message queryLanguage="MDX"reportQuery="fmQuery"severity="information"title="XQE Message"type="DMR">WITH
  MEMBER [Measures].[XQE_NULL_CM0] AS 'NULL', SOLVE_ORDER = 65535
SELECT 
  [Dimensional Model_Dim - Customer].[Customer].[Customer].MEMBERS DIMENSION PROPERTIES PARENT_LEVEL,  PARENT_UNIQUE_NAME,  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Anchor Id],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer (Caption)],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Effective Date],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Customer Number],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Custumer Type Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Custumer Type Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Identification Number],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Identification Type Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Industry Classification Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Industry Classification Name],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Postal Address],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Primary Branch Code],  [Dimensional Model_Dim - Customer].[Customer].[Customer].[Primary Branch Name] ON AXIS(0), 
  {[Measures].[XQE_NULL_CM0]} DIMENSION PROPERTIES PARENT_LEVEL,  PARENT_UNIQUE_NAME ON AXIS(1)
FROM [Database]  CELL PROPERTIES CELL_ORDINAL,  FORMAT_STRING,  VALUE
</message>
 <message queryLanguage="cognosSQL"reportQuery="fmQuery"severity="information"title="XQE Message"type="DMR">XQE-DVL-0002 "fmQuery" used a relational subquery to load levels.

SELECT
    CST_DIM.ANCHOR_ID AS column0, 
    CST_DIM.CST_NBR || ' - ' || CST_DIM.CST_NM AS column1, 
    CST_DIM.IDY_CL_NM AS column2, 
    CST_DIM.IDENTN_TP_CODE AS column3, 
    CST_DIM.PST_ADR AS column4, 
    CST_DIM.IDENTN_NBR AS column5, 
    CST_DIM.CST_NM AS column6, 
    CST_DIM.PRIM_BR_CODE AS column7, 
    CST_DIM.CST_TP_CODE AS column8, 
    CST_DIM.CST_NBR AS column9, 
    CST_DIM.CST_TP_NM AS column10, 
    CST_DIM.PRIM_BR_NM AS column11, 
    CST_DIM.CST_EFF_DT AS column12, 
    CST_DIM.IDY_CL_CODE AS column13
FROM
    ORA_TPBDWH_PoC..TPB_DMT.CST_DIM CST_DIM 
WHERE 
    CST_DIM.ANCHOR_ID = 1265987 
GROUP BY 
    CST_DIM.ANCHOR_ID, 
    CST_DIM.CST_NBR || ' - ' || CST_DIM.CST_NM, 
    CST_DIM.IDY_CL_NM, 
    CST_DIM.IDENTN_TP_CODE, 
    CST_DIM.PST_ADR, 
    CST_DIM.IDENTN_NBR, 
    CST_DIM.CST_NM, 
    CST_DIM.PRIM_BR_CODE, 
    CST_DIM.CST_TP_CODE, 
    CST_DIM.CST_NBR, 
    CST_DIM.CST_TP_NM, 
    CST_DIM.PRIM_BR_NM, 
    CST_DIM.CST_EFF_DT, 
    CST_DIM.IDY_CL_CODE 
ORDER BY 
    column1 ASC, 
    column0 ASC
</message>
 <message queryLanguage="nativeSQL"reportQuery="fmQuery"severity="information"title="XQE Message"type="DMR">SELECT DISTINCT 
    "CST_DIM"."ANCHOR_ID" AS "column0", 
    CASE 
        WHEN 
            "CST_DIM"."CST_NBR" IS NULL OR
            "CST_DIM"."CST_NM" IS NULL
            THEN
                NULL
        ELSE "CST_DIM"."CST_NBR" || ' - ' || "CST_DIM"."CST_NM"
    END AS "column1", 
    "CST_DIM"."IDY_CL_NM" AS "column2", 
    "CST_DIM"."IDENTN_TP_CODE" AS "column3", 
    "CST_DIM"."PST_ADR" AS "column4", 
    "CST_DIM"."IDENTN_NBR" AS "column5", 
    "CST_DIM"."CST_NM" AS "column6", 
    "CST_DIM"."PRIM_BR_CODE" AS "column7", 
    "CST_DIM"."CST_TP_CODE" AS "column8", 
    "CST_DIM"."CST_NBR" AS "column9", 
    "CST_DIM"."CST_TP_NM" AS "column10", 
    "CST_DIM"."PRIM_BR_NM" AS "column11", 
    "CST_DIM"."CST_EFF_DT" AS "column12", 
    "CST_DIM"."IDY_CL_CODE" AS "column13"
FROM
    "TPB_DMT"."CST_DIM" "CST_DIM" 
WHERE 
    "CST_DIM"."ANCHOR_ID" = 1265987 
ORDER BY 
    "column1" ASC NULLS LAST, 
    "column0" ASC NULLS LAST
</message>
 </messageFolder>
 </messageFolder>
-<edge name="columns">
-<columnList>
 <item length="-1"name="Customer (All)"nullsAllowed="true"precision="0"scale="0"sqlName="Customer (All)"type="sqlVarChar"/>
 <item length="20"name="Anchor Id"nullsAllowed="true"precision="38"scale="0"sqlName="Anchor Id"type="sqlDecimal"/>
 <item length="514"name="Customer Name"nullsAllowed="true"precision="256"scale="0"sqlName="Customer Name"type="sqlVarChar"/>
 <item length="560"name="Customer (Caption)"nullsAllowed="true"precision="279"scale="0"sqlName="Customer (Caption)"type="sqlVarChar"/>
 <item length="42"name="Customer Number"nullsAllowed="true"precision="20"scale="0"sqlName="Customer Number"type="sqlVarChar"/>
 <item length="12"name="Customer Effective Date"nullsAllowed="true"precision="0"scale="0"sqlName="Customer Effective Date"type="sqlTimestamp2"/>
 <item length="62"name="Primary Branch Code"nullsAllowed="true"precision="30"scale="0"sqlName="Primary Branch Code"type="sqlVarChar"/>
 <item length="514"name="Primary Branch Name"nullsAllowed="true"precision="256"scale="0"sqlName="Primary Branch Name"type="sqlVarChar"/>
 <item length="62"name="Identification Type Code"nullsAllowed="true"precision="30"scale="0"sqlName="Identification Type Code"type="sqlVarChar"/>
 <item length="514"name="Identification Number"nullsAllowed="true"precision="256"scale="0"sqlName="Identification Number"type="sqlVarChar"/>
 <item length="62"name="Industry Classification Code"nullsAllowed="true"precision="30"scale="0"sqlName="Industry Classification Code"type="sqlVarChar"/>
 <item length="514"name="Industry Classification Name"nullsAllowed="true"precision="256"scale="0"sqlName="Industry Classification Name"type="sqlVarChar"/>
 <item length="514"name="Postal Address"nullsAllowed="true"precision="256"scale="0"sqlName="Postal Address"type="sqlVarChar"/>
 <item length="62"name="Custumer Type Code"nullsAllowed="true"precision="30"scale="0"sqlName="Custumer Type Code"type="sqlVarChar"/>
 <item length="514"name="Custumer Type Name"nullsAllowed="true"precision="256"scale="0"sqlName="Custumer Type Name"type="sqlVarChar"/>
 </columnList>
-<resultData>
-<row>
 <value v="Customer (All)"/>
 <value v="1265987"/>
 <value v="CUSTOMER00714216"/>
 <value v="00714216 - CUSTOMER00714216"/>
 <value v="00714216"/>
 <value v="Jun 3, 2015 12:00:00 AM"/>
 <value v="370"/>
 <value v="TPBANK DA NANG"/>
 <value v="CMND"/>
 <value v="00714216"/>
 <value v="UNKNOWN"/>
 <value v="UNKNOWN"/>
 <value v="ADDRESS_1_00714216 ADDRESS_2_00714216 ADDRESS_3_00714216 ADDRESS_4_00714216"/>
 <value v="I"/>
 <value v="Individual"/>
 </row>
 </resultData>
 </edge>
 </response>

1 个答案:

答案 0 :(得分:0)

Cognos正在对从数据库返回的数据进行分组。要解决此问题,请浏览每个查询项并将常规聚合设置为“未知/不支持”。