Ejemplo n.º 1
0
    //根据查询SQL,产生提供给报表生成需要的 XML 数据,字段值为空也产生数据
    public static void FullGenNodeXmlData(System.Web.UI.Page DataPage, string QuerySQL, bool ToCompress)
    {
        SqlConnection ReportConn        = new SqlConnection(SqlConnStr);
        SqlCommand    ReportDataCommand = new SqlCommand(QuerySQL, ReportConn);

        ReportConn.Open();
        SqlDataReader ReportDataReader = ReportDataCommand.ExecuteReader();

        XMLReportData.GenNodeXmlDataFromReader(DataPage, ReportDataReader, ToCompress? ResponseDataType.ZipBinary : ResponseDataType.PlainText);
        ReportDataReader.Close();
        ReportConn.Close();
    }
Ejemplo n.º 2
0
    //根据查询SQL,产生提供给报表生成需要的 XML 数据,字段值为空也产生数据
    public static void FullGenNodeXmlData(System.Web.UI.Page DataPage, string QuerySQL, bool ToCompress)
    {
        OleDbConnection myConn    = new OleDbConnection(OleDbConnStr);
        OleDbCommand    myCommand = new OleDbCommand(QuerySQL, myConn);

        myConn.Open();
        OleDbDataReader myReader = myCommand.ExecuteReader();

        XMLReportData.GenNodeXmlDataFromReader(DataPage, myReader, ToCompress? ResponseDataType.ZipBinary : ResponseDataType.PlainText);
        myReader.Close();
        myConn.Close();
    }