Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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,



  • gunapriyangunapriyan Posts: 5Member

    Dear Friends,

    Finally i had avoid error in Shape Command;

    SHAPE {select distinct(Country_name) from Country_Master} APPEND ((SHAPE {select cm.country_name,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 teatype_master ttm on ttm.type_name=er.type_name join teavariety_master tvm on tvm.variety_name=er.variety_name join country_master cm on cm.country_name=er.country_name where returns_month between '" & stretmon & "' and '" & stretmon1 & "' and quantity!=0 group by cm.country_name,er.type_name,er.variety_name } AS Ret APPEND ({select distinct(Type_Name) from TeaType_master} As Typ RELATE Type_Name to Type_Name)) RELATE Country_Name to Country_Name)

    But now i am facing new error. Please find my design in attachment.

    At the end of scene, It showing "Control "Text1" cannot be place in this place.

    I am very tired. Please help me.

    Thanks in advance.

    Thanks & Regards,


  • qsterqster SpainPosts: 25Member, Administrator admin

    I have Tweeted this on the Programmersheaven Twitter feed, good luck!


Sign In or Register to comment.