I have web static webmethod i.e
- [WebMethod]
- public static string search_data(DateTime fromdate, DateTime todate, string region)
- {
- try
- {
- string result = "";
- Ts1 td = new T1();
- DateTime frDate = new DateTime(fromdate.Year, fromdate.Month, fromdate.Day, 0, 0, 0);
- DateTime to_Date = new DateTime(todate.Year, todate.Month, todate.Day, 23, 59, 59);
- List<griddataresult_Result> dq = td.griddataresult(frDate, to_Date, region).ToList();
-
- DataTable dt = new DataTable();
- dt.Columns.Add("ID", typeof(int));
- dt.Columns.Add("OwnerName", typeof(string));
- dt.Columns.Add("RegNo", typeof(string));
- foreach (var c in dq)
- {
-
- dt.Rows.Add(c.ID, c.OwnerName, c.RegNo);
- }
- result = DataSetToJSON(dt);
- return result;
- }
- catch (Exception)
- {
- throw new Exception();
- }
i call this static web method in jquery and i populate table with the help of jquery like this
- var final = JSON.parse(result.d).response;
- console.log(JSON.parse(result.d).response);
- $("#tabledata").empty();
-
- if (final.length > 0) {
- $("#tabledata").append(
- "<thead><tr><th>ID</th><th>Owner</th><th>RegNo</th></tr></thead>");
-
- for (var i = 0; i < final.length; i++) {
-
- if (final[i] !== null) {
- $("#tabledata").append("<tbody><tr><td>" +
- final[i][0] + "</td> <td>" +
- final[i][1] + "</td> <td>" +
- final[i][2] + "</td> </tr></tbody>");
-
- }
- }
- $("#tabledata tr:first").addClass('GridviewScrollHeader');
- $("#tabledata tr").addClass('GridviewScrollItem');
- $("#tabledata").addClass('GridviewScrollPager');
- }
- else {
- $("#tabledata").hide();
-
- $("#<%=Label5.ClientID%>").text("No data");
- }
-
- },
Data is successfully display in table . In web form page there is one drop-down and two date-picker (from date & to date) according to selection of these values table data is display is tablenow i want to create crystal report i want when i click on export button then table data ,drop down value & date-picker value will be display in report
how i display region, from date, to date value and table data in crystal report how i do this