/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetail">明细数据内容</param> /// <returns></returns> public static string ToReportData(DataTable dtMaster, DataTable dtDetail) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); xmlData.AddDetail("Detail1", dtDetail, "", ""); return(xmlData.ExportToJson()); }
/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetail">明细数据内容</param> /// <returns></returns> public static void ToReportData(DataTable dtMaster, DataTable dtDetail, TextWriter write) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); xmlData.AddDetail("Detail1", dtDetail, "", ""); xmlData.ExportToXML(write); }
/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetails">多个明细数据内容</param> /// <returns></returns> public static void ToReportData(DataTable dtMaster, DataTable[] dtDetails, TextWriter write) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); for (int i = 0; i < dtDetails.Length; i++) { xmlData.AddDetail("Detail" + (i + 1).ToString(), dtDetails[i], "", ""); } xmlData.ExportToXML(write); }
/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetails">多个明细数据内容</param> /// <returns></returns> public static string ToReportData(DataTable dtMaster, DataTable[] dtDetails) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); for (int i = 0; i < dtDetails.Length; i++) { xmlData.AddDetail("Detail" + (i + 1).ToString(), dtDetails[i], "", ""); } return(xmlData.ExportToJson()); }
/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetails">多个明细数据内容</param> /// <returns></returns> public static string ToReportData(DataTable dtMaster, DataTable[] dtDetails) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); for (int i = 0; i < dtDetails.Length; i++) { xmlData.AddDetail("Detail" + (i + 1).ToString(), dtDetails[i], "", ""); } return xmlData.ExportToJson(); }
/// <summary> /// 转换为报表数据 /// </summary> /// <param name="dtMaster">报表页眉数据内容</param> /// <param name="dtDetail">明细数据内容</param> /// <returns></returns> public static string ToReportData(DataTable dtMaster, DataTable dtDetail) { RAXmlDataSource xmlData = new RAXmlDataSource(); xmlData.SetMaster(dtMaster, ""); xmlData.AddDetail("Detail1", dtDetail, "", ""); return xmlData.ExportToJson(); }