View Single Post
  #1 (permalink)  
Old October 25th, 2013, 07:37 AM
gunapriyan gunapriyan is offline
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem in Shape Command

Dear Friends,

I want to 3 level grouping in Data Report. To achieve that, I had write the following code;


SHAPE {select distinct(Country_name) from Country_Master}
APPEND ((SHAPE {select distinct(Type_Name) from Type_master } AS Level1
APPEND ({ select er.type_name,er.variety_name,sum(Quantity) Quantity,sum(Fob) Fob,convert(numeric(18,2),sum(Fob)/sum(Quantity)) Unitprice from Exporter_Returns er join type_master ttm on ttm.type_name=er.type_name join variety_master tvm on tvm.variety_name=er.variety_name where returns_month between '2010-01-01' and '2013-08-01' and quantity!=0 group by er.type_name,er.variety_name})
RELATE Type_Name to Type_Name AS Level2))
RELATE Country_Name to Country_Name AS Level3)



1. Table Country Master have Country_Name and Type_Master have Type Name.

Country [1st Level]
|
Type [2nd Level]
|
Variety [3rd Level]

I had received Error Message that Country_Name is not in Rowset.

Please help me.

Thanks & Regards,

Aakash
Reply With Quote