当前位置:编程学习 > C#/ASP.NET >>

Stimulsoft.Report 如此奇怪的问题

初次测试Stimulsoft.Report,出现一相奇怪的问题。
从数据库执行 select  GoodsCode, GoodsName, GoodsModel, Remarks, IsInclude, GoodsUp, GoodsDown, IsSignGoodsSN, CreateMan, ModifyMan, CreateDate, ModifyDate from goodsinfo where goodscode<'SP00009'  可查询出7条记录。
但用下面的代码,会形成很多页,而且每页的内容也是7条记录,不知问题出在何处。
  代码如下:
        stiViewerControl1.Report = null;
            Stimulsoft.Report.StiReport sr = new Stimulsoft.Report.StiReport();
          
            sr.Load(@"F:\download\Stimulsoft_Reports.Ultimate_2013.1-Bin\Bin\Reports\Report.mrt");
            sr.Render(false);
            sr.Dictionary.Databases.Clear();
            sr.Dictionary.DataSources.Clear();
            sr.DataSources.Clear();
            sr.Dictionary.Databases.Clear();
            sr.Dictionary.Databases.Add(new StiSqlDatabase("Connection", "server=.;database=minierp;user id=sa;password=88859150;"));
            StiSqlSource myDataSource = new StiSqlSource("Connection", "GoodsInfo", "GoodsInfo", "select  GoodsCode, GoodsName, GoodsModel, Remarks, IsInclude, GoodsUp, GoodsDown, IsSignGoodsSN, CreateMan, ModifyMan, CreateDate, ModifyDate from goodsinfo where goodscode<'SP00009'", true, false);
            StiDataColumn[] sdc = new StiDataColumn[] { new StiDataColumn("GoodsCode"), new StiDataColumn("GoodsName"), new StiDataColumn("GoodsModel"), new StiDataColumn("Remarks"), new StiDataColumn("CreateMan"), new StiDataColumn("ModifyMan"), new StiDataColumn("CreateDate"), new StiDataColumn("ModifyDate") };
            myDataSource.Columns.AddRange(sdc);
            sr.Dictionary.DataSources.Clear();
            sr.Dictionary.DataSources.Add(myDataSource);
            sr.Show();
            stiViewerControl1.Report = sr;

Stimulsoft.Report
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,