zoukankan      html  css  js  c++  java
  • 水晶报表

       //   ReportDocument report = new ReportDocument();
       //   report.Load(rptPath);
       //   report.SetDataSource(dt);
       //   report.Refresh();
       //
       //      CrystalReportViewer1.ReportSource = report;

       //
       FundRequirePlanReport = new ReportDocument();

       FundRequirePlanReport.Load(rptPath);
       FundRequirePlanReport.SetDataSource(dt);
       FundRequirePlanReport.Subreports["title"].SetDataSource(title);

       
       
       ParameterFields fields = new ParameterFields();
       this.AddParameters("ContName",ContName,fields);
       
       CrystalReportViewer1.ParameterFieldInfo = fields;

       CrystalReportViewer1.ReportSource = FundRequirePlanReport;

     public  CrystalDecisions.Shared.ParameterFields AddParameters(string paramName,string paramValue,ParameterFields paramFields)
      {

       ParameterField  paramField = new ParameterField();
       ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
       ParameterValues paramValues = new ParameterValues();

       paramField.Name = paramName;
       paramDiscreteValue.Value = paramValue;
       paramValues.Add(paramDiscreteValue);
       paramField.CurrentValues = paramValues;
       paramFields.Add(paramField);

       return paramFields ;
      }

      public  CrystalDecisions.Shared.ParameterFields AddParameters(string paramName,int paramValue,ParameterFields paramFields)
      {

       ParameterField  paramField = new ParameterField();
       ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
       ParameterValues paramValues = new ParameterValues();

       paramField.Name = paramName;
       paramDiscreteValue.Value = paramValue;
       paramValues.Add(paramDiscreteValue);
       paramField.CurrentValues = paramValues;
       paramFields.Add(paramField);

       return paramFields ;
      }

  • 相关阅读:
    类和对象代码练习1
    搬迁MSSQL出现的问题
    QQ群空间是我见过最烂的系统
    导出表数据脚本的存储过程 [转自CSDN]
    plesk for Linux 没有默认首页的优先级别设置
    传说中的otag开源是假的。BS!!!!!
    FTP关闭mput上传确认
    刚装的vs2008不能生成silverlight,郁闷中
    怎么查域名反向解析是否成功
    现在的黑客太有才了。。。/不喜欢开防火墙的要小心
  • 原文地址:https://www.cnblogs.com/shengel/p/1331349.html
Copyright © 2011-2022 走看看