Developer can create HTML Page as a Report in bar Chart from Window Application. THis will help to create a report sheet in bar chart as a HTML Page. // for Chart generator public string ChartDisplayCompMonthlySales(string[,] Data, int counter, string Charttype, string querytype) { if (Data == null) throw new ArgumentNullException("Data"); double max1 = 0, mx1; int v1; int[] value = new int[counter]; for (int cn = 0; cn < counter; cn++) // Find Maximum { if (max1 < Convert.ToDouble(Data[cn, 2])) max1 = Convert.ToDouble(Data[cn, 2]); } if (max1 >= 100000) { mx1 = (max1 / 10000); mx1 = mx1 + 1; mx1 = mx1 * 10000; } else { if (max1 >= 10000) { mx1 = (max1 / 1000); mx1 = mx1 + 1; mx1 = mx1 * 1000; } else { if (max1 >= 1000) { mx1 = (max1 / 100); mx1 = mx1 + 1; mx1 = mx1 * 100; } else { if (max1 >= 100) { mx1 = (max1 / 10); mx1 = mx1 + 1; mx1 = mx1 * 10; } else { if (max1 >= 10) { mx1 = (max1 / 1); mx1 = mx1 + 1; mx1 = mx1 * 1; } else mx1 = 10; } } } } int mx2 = (int)Math.Round(Convert.ToDouble(mx1 / 6)); for (int cn1 = 0; cn1 < counter; cn1++) { value[cn1] = ((Convert.ToInt32(Data[cn1, 2]) * 600) / (int)Math.Round(mx1)); } //htmlstring11 += ""; int temp = 0; int flag11 = 1; string htmlstrg = " Sales Vs Monthly Yearly Comparison
"; htmlstrg += ""; bookname1: if (Charttype == "book") { if (querytype == "compbook") htmlstrg += "" + Data[temp, 0] + " "; else if (querytype == "comptaluka") htmlstrg += "" + Data[temp, 0] + " "; else if (querytype == "compdistrict") htmlstrg += "" + Data[temp, 0] + " "; else if (querytype == "compstate") htmlstrg += "" + Data[temp, 0] + " "; else if (querytype == "compcustomer") htmlstrg += "" + Data[temp, 0] + " "; } else htmlstrg += " " + month_list[Convert.ToInt32(Data[temp, 0]) - 1] + "
"; htmlstrg += ""; htmlstrg += ""; //border=1 bordercolor=yellow string colorname = objrandom.Next(10).ToString() + objrandom.Next(10).ToString() + objrandom.Next(10).ToString() + objrandom.Next(10).ToString() + objrandom.Next(10).ToString() + objrandom.Next(10).ToString(); for (v1 = temp; v1 <= counter; v1++) { temp++; if (temp <= counter) { htmlstrg += "" + Data[v1, 1] + " " + //style=\"layout-flow : vertical-ideographic; \" "
" + Data[v1, 2] + "
" + " ";//#8B9BBA if (Data[v1, 0] != Data[temp, 0]) { htmlstrg += "
"; if (temp < counter) goto bookname1; } } } htmlstrg += "
"; return htmlstrg; // return Html string } /// Create HTML file public void PRINTHtmlString(string htmlpage) { StreamWriter SW = File.CreateText("c:\\visitdetail.htm"); SW.WriteLine(htmlpage); SW.Close(); webBrowser1.Navigate("c:\\visitdetail.htm"); }
Please add code under code block.