Query as follows;
select distinct r.rate As Rate,f.bfid as BFid,
CASE WHEN r.rate = '1' THEN '100'
WHEN r.rate = '2' THEN '75'
WHEN r.rate = '3' THEN '50'
WHEN r.rate = '4' THEN '25' ELSE '0' END AS Translated_Rate
FROM bthfac AS f,batch b,facfeedback r where f.facid= '60,75,6'
and f.Bthid=b.Bthid and r.bfid = f.bfid and b.class= 'PST'
and year(b.examdate)= '2011' and month(b.examdate)= '10'
when i execute the query output as follows;
Rate Bfid Translated_Rate
1 72 100
1 74 100
2 72 75
2 74 75
3 72 50
3 74 50
4 72 25
i show the above query output in gridview as follows
Rate Bfid Translated_Rate
1 72 100
1 74 100
2 72 75
2 74 75
3 72 50
3 74 50
4 72 25
i want to show the above Gridview records in charts,for that i written the code as follows;
dr = scon.ReadSql(sql);
int[] LRate = new int[GridView3.Rows.Count];
int[] LBFid = new int[GridView3.Rows.Count];
int i = 0;
while (dr.Read())
{
LRate[i] = int.Parse(dr[0].ToString());
LBFid[i] = int.Parse(dr[1].ToString());
Chart1.Series.Add(LBFid[i].ToString());
i = i + 1;
}
when i execute the above code, shows error as follows;
:A chart element with the name '72' already exists in the 'SeriesCollection'.
what is the problem in my above code.how can i solve the problem
please help me.
Regards,
Narasiman P.