在detail section expert 里的new after page 里写 RecorderNumber Mod 15 = 0

解决方案 »

  1.   

    根据记录数来确定页数.
    OleDbDataAdapter OD=new OleDbDataAdapter(strsql,Con); DataSet ds=new DataSet();
    OD.Fill(ds,"Tab");
    int count=ds.Tables["Tab"].Rows.Count;
    if(JB=="shi")
    {
    rt1.SetDataSource(ds.Tables["Tab"]);
    rt2.SetDataSource(ds.Tables["Tab"]);
    }
    else
    {
    rt.SetDataSource(ds.Tables["Tab"]);
    }
    int rowcount=ds.Tables["Tab"].Rows.Count;
    int m=rowcount/26;
    int n=rowcount%26;
    int pagecount;
    if(n==0)
    pagecount=m+1;
    else
    pagecount=m+1;
    rt.PrintOptions.PrinterName=@System.Configuration.ConfigurationSettings.AppSettings ["A3PrintName"].ToString();
    rt.PrintToPrinter(1,false,1,pagecount);