This is a migrated thread and some comments may be shown as answers.

Stepped Layout Error

3 Answers 57 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan Lege
Top achievements
Rank 1
Ryan Lege asked on 12 Sep 2011, 03:22 PM
I've tried a million times and I get the same issue. When I try the stepped layout I get a generation error that states "OBJECT WITH NAME 'Country' ALREADY EXISTS. OBJECTS SHOULD HAVE UNIQUE NAMES".  Yet the query IS bringing back unique names. I looked at the designer code generated and sure enough it is creating children with the same name, not sure why.

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Sep 2011, 03:44 PM
Hello Ryan Lege,

The Stepped Layout is the default option in the Report Wizard and we have not been contacted with such a problem so far. We would appreciate if you share which version of Telerik Reporting you're using and whether you can reproduce this with a query to the AdventureWorks database or only when querying your database. If you can reproduce this with the AdventureWorks, please provide us with the exact query to use in order to replicate the problem. If the issue occurs only with your database, please open an official support thread and attach a sample report and your database.

Best wishes,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Ryan Lege
Top achievements
Rank 1
answered on 13 Sep 2011, 07:39 AM
No I'm talking about the Crosstab wizard control. I did try it with AdventureWorks and got the same problem. Here is the query:

SELECT        Production.Product.Name, Production.ProductInventory.Quantity, Production.ProductSubcategory.Name AS Sub, Production.Location.Name AS Location
FROM            Production.Product INNER JOIN
                         Production.ProductSubcategory ON Production.Product.ProductSubcategoryID = Production.ProductSubcategory.ProductSubcategoryID INNER JOIN
                         Production.ProductInventory ON Production.Product.ProductID = Production.ProductInventory.ProductID INNER JOIN
                         Production.Location ON Production.ProductInventory.LocationID = Production.Location.LocationID

And here is the CrossTab Configuration plus the visual designer view attached:

 

//

 

// crosstab1

 

//

 

this.crosstab1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(1.5708342790603638D, Telerik.Reporting.Drawing.UnitType.Inch)));

 

this.crosstab1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(new Telerik.Reporting.Drawing.Unit(1.3520834445953369D, Telerik.Reporting.Drawing.UnitType.Inch)));

 

this.crosstab1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch)));

 

this.crosstab1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch)));

 

this.crosstab1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch)));

 

this.crosstab1.Body.SetCellContent(0, 0, this.textBox7);

 

this.crosstab1.Body.SetCellContent(0, 1, this.textBox8);

 

this.crosstab1.Body.SetCellContent(1, 0, this.textBox9);

 

this.crosstab1.Body.SetCellContent(1, 1, this.textBox10);

 

this.crosstab1.Body.SetCellContent(2, 0, this.textBox11);

 

this.crosstab1.Body.SetCellContent(2, 1, this.textBox12);

tableGroup1.Groupings.AddRange(

 

new Telerik.Reporting.Data.Grouping[] {

 

new Telerik.Reporting.Data.Grouping("=Fields.Location")});

tableGroup1.Name =

 

"Location";

tableGroup1.ReportItem =

 

this.textBox1;

tableGroup1.Sortings.AddRange(

 

new Telerik.Reporting.Data.Sorting[] {

 

new Telerik.Reporting.Data.Sorting("=Fields.Location", Telerik.Reporting.Data.SortDirection.Asc)});

tableGroup2.ReportItem =

 

this.textBox2;

 

this.crosstab1.ColumnGroups.Add(tableGroup1);

 

this.crosstab1.ColumnGroups.Add(tableGroup2);

 

this.crosstab1.Corner.SetCellContent(0, 0, this.textBox6);

 

this.crosstab1.DataSource = this.sqlDataSource1;

 

this.crosstab1.Items.AddRange(new Telerik.Reporting.ReportItemBase[] {

 

this.textBox1,

 

this.textBox2,

 

this.textBox6,

 

this.textBox7,

 

this.textBox8,

 

this.textBox9,

 

this.textBox10,

 

this.textBox11,

 

this.textBox12,

 

this.textBox3,

 

this.textBox4,

 

this.textBox5});

 

this.crosstab1.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(3.9418537198798731E-05D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(3.9418537198798731E-05D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.crosstab1.Name = "crosstab1";

tableGroup4.Groupings.AddRange(

 

new Telerik.Reporting.Data.Grouping[] {

 

new Telerik.Reporting.Data.Grouping("=Fields.Name")});

tableGroup4.Name =

 

"Name";

tableGroup4.ReportItem =

 

this.textBox3;

tableGroup4.Sortings.AddRange(

 

new Telerik.Reporting.Data.Sorting[] {

 

new Telerik.Reporting.Data.Sorting("=Fields.Name", Telerik.Reporting.Data.SortDirection.Asc)});

tableGroup6.Groupings.AddRange(

 

new Telerik.Reporting.Data.Grouping[] {

 

new Telerik.Reporting.Data.Grouping("=Fields.Sub")});

tableGroup6.Name =

 

"Sub";

tableGroup6.ReportItem =

 

this.textBox4;

tableGroup6.Sortings.AddRange(

 

new Telerik.Reporting.Data.Sorting[] {

 

new Telerik.Reporting.Data.Sorting("=Fields.Sub", Telerik.Reporting.Data.SortDirection.Asc)});

tableGroup5.ChildGroups.Add(tableGroup6);

tableGroup5.Groupings.AddRange(

 

new Telerik.Reporting.Data.Grouping[] {

 

new Telerik.Reporting.Data.Grouping("=Fields.Sub")});

tableGroup5.Name =

 

"Sub";

tableGroup5.Sortings.AddRange(

 

new Telerik.Reporting.Data.Sorting[] {

 

new Telerik.Reporting.Data.Sorting("=Fields.Sub", Telerik.Reporting.Data.SortDirection.Asc)});

tableGroup3.ChildGroups.Add(tableGroup4);

tableGroup3.ChildGroups.Add(tableGroup5);

tableGroup3.Groupings.AddRange(

 

new Telerik.Reporting.Data.Grouping[] {

 

new Telerik.Reporting.Data.Grouping("=Fields.Name")});

tableGroup3.Name =

 

"Name";

tableGroup3.Sortings.AddRange(

 

new Telerik.Reporting.Data.Sorting[] {

 

new Telerik.Reporting.Data.Sorting("=Fields.Name", Telerik.Reporting.Data.SortDirection.Asc)});

tableGroup7.ReportItem =

 

this.textBox5;

 

this.crosstab1.RowGroups.Add(tableGroup3);

 

this.crosstab1.RowGroups.Add(tableGroup7);

 

this.crosstab1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(4.2645845413208008D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.800000011920929D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.crosstab1.StyleName = "Normal.TableNormal";

 

//

 

// textBox1

 

//

 

this.textBox1.Name = "textBox1";

 

this.textBox1.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.5708333253860474D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox1.StyleName = "Normal.TableGroup";

 

this.textBox1.Value = "=Fields.Location";

 

//

 

// textBox2

 

//

 

this.textBox2.Name = "textBox2";

 

this.textBox2.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3520834445953369D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox2.StyleName = "Normal.GrandTotal";

 

this.textBox2.Value = "Total";

 

//

 

// textBox3

 

//

 

this.textBox3.Name = "textBox3";

 

this.textBox3.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3416666984558106D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox3.Style.Padding.Left = new Telerik.Reporting.Drawing.Unit(0D, Telerik.Reporting.Drawing.UnitType.Inch);

 

this.textBox3.StyleName = "Normal.SubTotal";

 

this.textBox3.Value = "=Fields.Name";

 

//

 

// textBox4

 

//

 

this.textBox4.Name = "textBox4";

 

this.textBox4.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3416666984558106D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox4.Style.Padding.Left = new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch);

 

this.textBox4.StyleName = "Normal.SubTotal";

 

this.textBox4.Value = "=Fields.Sub";

 

//

 

// textBox5

 

//

 

this.textBox5.Name = "textBox5";

 

this.textBox5.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3416666984558106D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox5.StyleName = "Normal.GrandTotal";

 

this.textBox5.Value = "Total";

 

//

 

// textBox6

 

//

 

this.textBox6.Name = "textBox6";

 

this.textBox6.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3416666984558106D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox6.StyleName = "Normal.TableHeader";

 

this.textBox6.Value = "Sub";

 

//

 

// textBox7

 

//

 

this.textBox7.Name = "textBox7";

 

this.textBox7.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.5708333253860474D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox7.StyleName = "Normal.SubTotal";

 

this.textBox7.Value = "=Sum(Fields.Quantity)";

 

//

 

// textBox8

 

//

 

this.textBox8.Name = "textBox8";

 

this.textBox8.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3520834445953369D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox8.StyleName = "Normal.GrandTotal";

 

this.textBox8.Value = "=Sum(Fields.Quantity)";

 

//

 

// textBox9

 

//

 

this.textBox9.Name = "textBox9";

 

this.textBox9.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.5708333253860474D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox9.StyleName = "Normal.TableBody";

 

this.textBox9.Value = "=Sum(Fields.Quantity)";

 

//

 

// textBox10

 

//

 

this.textBox10.Name = "textBox10";

 

this.textBox10.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3520834445953369D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox10.StyleName = "Normal.GrandTotal";

 

this.textBox10.Value = "=Sum(Fields.Quantity)";

 

//

 

// textBox11

 

//

 

this.textBox11.Name = "textBox11";

 

this.textBox11.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.5708333253860474D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox11.StyleName = "Normal.GrandTotal";

 

this.textBox11.Value = "=Sum(Fields.Quantity)";

 

//

 

// textBox12

 

//

 

this.textBox12.Name = "textBox12";

 

this.textBox12.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(1.3520834445953369D, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.20000000298023224D, Telerik.Reporting.Drawing.UnitType.Inch));

 

this.textBox12.StyleName = "Normal.GrandTotal";

 

this.textBox12.Value = "=Sum(Fields.Quantity)";

0
Hrisi
Telerik team
answered on 15 Sep 2011, 05:28 PM
Hello Ryan Lege,

This is a known issue with our Crosstab Wizard and the fix will be available in the upcoming service pack. In meantime you can do the following:
  • Generate the Crosstab with the wizard
  • Open the Group Explorer and you can see the nested groups with the same names. Change the names.

In your case you have two row groups with the name "Name" and two row groups with the name "Sub".

Kind regards,
Hrisi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
General Discussions
Asked by
Ryan Lege
Top achievements
Rank 1
Answers by
Steve
Telerik team
Ryan Lege
Top achievements
Rank 1
Hrisi
Telerik team
Share this question
or