Yuvatha Posted April 15, 2014 Report Posted April 15, 2014 duplicate column names unnai report viewer lo..when exporting to csv, 'A column named 'xxxx' already belongs to this DataTable.' error kodtundi..anyideas ?
loveindia Posted April 15, 2014 Report Posted April 15, 2014 Is it through SSRS. If so it is known issue. You cannot have multiple columns with same names. Alias the names of the columns with different ones and it will work fine.
Yuvatha Posted April 15, 2014 Author Report Posted April 15, 2014 Is it through SSRS. If so it is known issue. You cannot have multiple columns with same names. Alias the names of the columns with different ones and it will work fine. it is not ssrs., it it rdlc report viewer. column name on table different ichadu kani description same pettadu..so adi issue.
athadu Posted April 15, 2014 Report Posted April 15, 2014 Similar concept, rename the column to a different name. it is not ssrs., it it rdlc report viewer. column name on table different ichadu kani description same pettadu..so adi issue.
Yuvatha Posted April 15, 2014 Author Report Posted April 15, 2014 Similar concept, rename the column to a different name. its gonna be a db change... .net side nunchi em cheyalema?
ChampakDas Posted April 15, 2014 Report Posted April 15, 2014 before adding columns to the table just do this If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then 'Set column name to whatever you want Columnname = Columnname + "1" End If
Yuvatha Posted April 15, 2014 Author Report Posted April 15, 2014 before adding columns to the table just do this If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then 'Set column name to whatever you want Columnname = Columnname + "1" End If 5 times undi bhayya
Suhaas Posted April 15, 2014 Report Posted April 15, 2014 before adding columns to the table just do this If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then'Set column name to whatever you want Columnname = Columnname + "1" End If 5 times undi bhayya 5 times unte loop petti 5 times rename cheyyakapoav i = 1; If (table.Columns.Contains("Column-name-you-are-about-to-add")) { Columnname = Columnname + i.ToString(); i++; }
Yuvatha Posted April 15, 2014 Author Report Posted April 15, 2014 5 times unte loop petti 5 times rename cheyyakapoav i = 1; If (table.Columns.Contains("Column-name-you-are-about-to-add")) { Columnname = Columnname + i.ToString(); i++; } tried this....everytime i=1 aitundi ga...so always it will be caluname1 -- duplicate antundi baa
Suhaas Posted April 15, 2014 Report Posted April 15, 2014 tried this....everytime i=1 aitundi ga...so always it will be caluname1 -- duplicate antundi baa Ok. everytime i =1 ante adhi paina loop lo ledhemo. How about this. If (table.Columns.Contains("Column-name-you-are-about-to-add")) { Columnname = Columnname + table.columns.count.ToString(); }
ChampakDas Posted April 15, 2014 Report Posted April 15, 2014 pandaga chesko...number keeps changing based on the columns If (table.Columns.Contains("Column-name-you-are-about-to-add")) Then 'Set column name to whatever you want Columnname = Columnname + table.Columns.Count End If
ChampakDas Posted April 15, 2014 Report Posted April 15, 2014 GP..dint see this Ok. everytime i =1 ante adhi paina loop lo ledhemo. How about this. If (table.Columns.Contains("Column-name-you-are-about-to-add")) { Columnname = Columnname + table.columns.count.ToString(); }
Recommended Posts