cdzy12153 2017-10-19 18:20 采纳率: 0%
浏览 707

rdlc报表疑云,请赐教!!!

        //取得数据集

        string connstring = "Data Source=127.0.0.1;Initial Catalog=abn_LTGS;User ID=sa;Password=;Persist Security Info=True;MultipleActiveResultSets=False;Packet Size=4096";

        System.Data.SqlClient.SqlConnection conn1 = new System.Data.SqlClient.SqlConnection(connstring);

        System.Data.SqlClient.SqlCommand command1 = new System.Data.SqlClient.SqlCommand("select lane from deviantList", conn1);

        System.Data.SqlClient.SqlDataAdapter ada1 = new System.Data.SqlClient.SqlDataAdapter(command1);

        DataSet c_ds = new DataSet();

        try
        {

            conn1.Open();

            ada1.Fill(c_ds);

        }

        finally
        {

            conn1.Close();

            command1.Dispose();

            conn1.Dispose();

        }
        //为报表浏览器指定报表文件
        this.reportViewer1.LocalReport.ReportPath = @"d:\documents\visual studio 2010\Projects\报表1\报表1\Report1.rdlc";
       this.reportViewer1.LocalReport.DataSources.Clear();
        this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", c_ds.Tables[0]));
      this.reportViewer1.RefreshReport();

加载数据正常!
这里设置边距和A4纸

图片说明
rdlc XML
图片说明
http://ask.csdn.net/questions?type=reward#


图片说明

导出EXCEL后边距却没有改变
请赐教!!

  • 写回答

2条回答

  • devmiao 2017-10-20 01:09
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算