p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   VB Components (http://p2p.wrox.com/vb-components-84/)
-   -   Problem in Shape Command (http://p2p.wrox.com/vb-components/91264-problem-shape-command.html)

gunapriyan October 25th, 2013 06:37 AM

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


All times are GMT -4. The time now is 01:11 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.