本文整理汇总了C#中ParameterValues类的典型用法代码示例。如果您正苦于以下问题:C# ParameterValues类的具体用法?C# ParameterValues怎么用?C# ParameterValues使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterValues类属于命名空间,在下文中一共展示了ParameterValues类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: printReport
public Boolean printReport(CrystalDecisions.CrystalReports.Engine.ReportClass crReport, CrystalReportViewer CrystalReportViewer1, String param1, String ParamName1, String param2, String ParamName2)
{
if (PrinterName=="none") return false;
paramField.ParameterFieldName = ParamName1;
discreteVal.Value = param1;
paramField.CurrentValues.Add (discreteVal);
paramFields.Add (paramField);
crReport.DataDefinition.ParameterFields[0].CurrentValues.Add (discreteVal);
paramField2.ParameterFieldName = ParamName2;
discreteVal2.Value = param2;
paramField2.CurrentValues.Add (discreteVal2);
paramFields.Add (paramField2);
crReport.DataDefinition.ParameterFields[1].CurrentValues.Add (discreteVal2);
CrystalReportViewer1.ReportSource = crReport;
CrystalReportViewer1.ParameterFieldInfo = paramFields;
CrystalReportViewer1.RefreshReport();
ParameterValues tmpParam = new ParameterValues();
ParameterValues tmpParam2 = new ParameterValues();
tmpParam.Add(discreteVal);
tmpParam2.Add(discreteVal2);
crReport.DataDefinition.ParameterFields[0].ApplyCurrentValues(tmpParam);
crReport.DataDefinition.ParameterFields[1].ApplyCurrentValues(tmpParam2);
crReport.PrintOptions.PrinterName = PrinterName;
// crReport.PrintToPrinter(1,false,1,1);
crReport.PrintToPrinter(1,false,1,99);
//Response.write (PrinterName);
return true;
}
开发者ID:khaneh,项目名称:Orders,代码行数:33,代码来源:ReportManager.cs
示例2: button1_Click
private void button1_Click(object sender, EventArgs e)
{
var report = new rptTestimonial();
ParameterValues pvValues = new ParameterValues();
ParameterDiscreteValue pdvDiscreteValue = new ParameterDiscreteValue();
pdvDiscreteValue.Value = textBox1.Text;
pvValues.Add(pdvDiscreteValue);
ParameterFieldDefinitions pfdDefinitions = report.DataDefinition.ParameterFields;
ParameterFieldDefinition prdDefinition = pfdDefinitions["textThing"];
prdDefinition.ApplyCurrentValues(pvValues);
/*var data =
Database.Row("learner_details a, enrollments b, enrollmentscourses c, courses d",
"a.Division = '" + clsGlobal.loggedOnUserDivison + "' AND a.LearnerNumber = '" +
number.Selection +
"' AND b.LearnerKey = a.LearnerKey AND c.idEnrollments = b.idEnrollments AND" +
" d.idCourses = c.idCourses");*/
report.DataDefinition.FormulaFields["mainText"].Text = "\"" + textBox1.Text + "\"";
report.DataDefinition.FormulaFields["principle"].Text = "\"" + GlobalProperties.DivisionPrinciple + "\"";
report.DataDefinition.FormulaFields["name"].Text = "\"" + learner["Surname"] + ", " + learner["name"]+ "\"";
report.DataDefinition.FormulaFields["learnerNumber"].Text = "\"" + number + "\"";
//report.DataDefinition.FormulaFields["respParty"].Text = "\"" + clsGlobal.loggedOnUser + "\"";
//report.DataDefinition.FormulaFields["course"].Text = "\"" + Convert.ToString(data["Name1"]) + "\"";
//logs.WriteXml(@"C:\tmpXml.xml");
var frmReport = new frmReport(report) { Text = "Testimonial" };
frmReport.ShowDialog();
}
开发者ID:robertfall,项目名称:LAD,代码行数:34,代码来源:frmTestimonial.cs
示例3: GroupReport_Load
private void GroupReport_Load(object sender, EventArgs e)
{
repDoc = new ReportDocument();
ParameterFields rptParams;
ParameterValues paramValues;
ParameterDiscreteValue paramDiscreteValue;
ParameterField paramField;
try
{
repDoc.Load("../../Reports/Group.rpt");
//repDoc.Load("C:\\Users\\keith.sullivan\\Documents\\CIS\\CISApp\\CISApp\\Reports\\Group.rpt");
rptParams = repDoc.ParameterFields;
paramValues = new ParameterValues();
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = groupId;
paramValues.Add(paramDiscreteValue);
paramField = rptParams["studentgroup"];
paramField.CurrentValues = paramValues;
crystalReportViewer1.ReportSource = repDoc;
crystalReportViewer1.Refresh();
}
catch (Exception ex)
{
Console.WriteLine(ex);
Console.WriteLine("Could not connect to report");
}
}
开发者ID:keithsullivan3,项目名称:CIS,代码行数:28,代码来源:GroupReport.cs
示例4: FrmVisualizadorContrato_Load
private void FrmVisualizadorContrato_Load(object sender, EventArgs e)
{
//ReportDocument report = new ReportDocument();
//report.Load("C:\\Users\\João\\Documents\\Video Aulas\\Canal Professor Drausion\\1° Temporada\\KISNER_EVENTOS\\Apresentacao\\Relatorios\\Contrato\\RelContrato.rpt");
//string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
//report.Load("\\Relatorios\\Contrato\\RelContrato.rpt");
Relatorios.Contrato.RelContrato report = new Relatorios.Contrato.RelContrato();
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = codEvento;
crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["ParCodEvento"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
//trabalhando com os brinquedos escolhidos pelo usuário! Usando DataSet
/*Relatorios.Contrato.DsEventoBrinquedo eb = new Relatorios.Contrato.DsEventoBrinquedo();
DataTable brinquedos = eb.Tables.Add("DtBrinquedo");
brinquedos.Columns.Add("codBrinquedo", Type.GetType("System.Int32"));
brinquedos.Columns.Add("nome", Type.GetType("System.String"));
BrinquedoColecao bc = new BrinquedoColecao();
*/
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
crystalReportViewer1.ReportSource = report;
crystalReportViewer1.Refresh();
}
开发者ID:SirKrogoth,项目名称:KisnerEventos,代码行数:34,代码来源:FrmVisualizadorContrato.cs
示例5: button1_Click
private void button1_Click(object sender, EventArgs e)
{
try
{
ReportDocument crystalrpt = new ReportDocument();
crystalrpt.Load(@"C:\Users\Lahkrome\Desktop\Beta Sinergia\alfa2_Sinergia\CrystalReport.rpt");
//crystalReportViewer1.ReportSource = crystalrpt;
//crystalReportViewer1.Refresh();
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = textBox1.Text;
crParameterFieldDefinitions = crystalrpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["ProductName"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
crystalReportViewer1.ReportSource = crystalrpt;
crystalReportViewer1.Refresh();
}
catch (Exception ex)
{
MessageBox.Show("Error"+ex);
}
}
开发者ID:Lahkrome,项目名称:Sinergia,代码行数:31,代码来源:Reporte.cs
示例6: btnExecute_Click
private void btnExecute_Click(object sender, EventArgs e)
{
ReportDocument report = new ReportDocument();
report.Load(this.filePath);
report.SetDatabaseLogon(userName, password, server, db);
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
//order no
crParameterDiscreteValue.Value = txtFilter.Text;
crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["orderNo"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
//start date
crParameterDiscreteValue.Value = dtpStartDate.Value;
crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["startDate"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
//end date
crParameterDiscreteValue.Value = dtpEndDate.Value;
crParameterFieldDefinitions = report.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["endDate"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = server;
crConnectionInfo.DatabaseName = db;
crConnectionInfo.UserID = userName;
crConnectionInfo.Password = password;
TableLogOnInfo logOnInfo = new TableLogOnInfo();
logOnInfo.ConnectionInfo = crConnectionInfo;
TableLogOnInfos logOnInfos = new TableLogOnInfos();
logOnInfos.Add(logOnInfo);
crystalReportViewer.LogOnInfo = logOnInfos;
crystalReportViewer.ReportSource = report;
crystalReportViewer.Refresh();
}
开发者ID:hpinio,项目名称:BMResto_v1.0,代码行数:59,代码来源:SalesOrderDetailViewer.cs
示例7: GetDeployTask
public override AsimovTask GetDeployTask(AsimovVersion version, ParameterValues parameterValues, AsimovUser user, string correlationId)
{
var task = new DeployTask(this, version, parameterValues, user, correlationId);
task.AddDeployStep<UpdateWebSite>();
foreach (var action in Actions.OfType<VerifyCommandUnitAction>())
{
task.AddDeployStep(new ExecuteUnitAction(action, user));
}
return task;
}
开发者ID:mullvaden,项目名称:asimov-deploy-winagent,代码行数:10,代码来源:WebSiteDeployUnit.cs
示例8: SetCurrentValuesForParameterField
private void SetCurrentValuesForParameterField(ParameterFields parameterFields, ArrayList arrayList)
{
ParameterValues currentParameterValues = new ParameterValues();
foreach (object submittedValue in arrayList)
{
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = submittedValue.ToString();
currentParameterValues.Add(parameterDiscreteValue);
}
ParameterField parameterField = parameterFields[PARAMETER_FIELD_NAME];
parameterField.CurrentValues = currentParameterValues;
}
开发者ID:kurteallen,项目名称:CrystalExample,代码行数:12,代码来源:Form1.cs
示例9: Read
public void Read(string srr)
{
this.reportQuary = dateTimePicker1.Text + " to " + dateTimePicker2.Text;
string query = "";
query = "Select * From TbDailyIncome Where IncomeDate BETWEEN '" + dateTimePicker1.Value.Date + "' AND '" + dateTimePicker2.Value.Date + "' AND Debit = @Debit Order By IncomeDate";
if (query != "")
{
SqlConnection conn = new SqlConnection(this.connectionString);
SqlCommand comm = new SqlCommand(query, conn);
comm.Parameters.Add("@Debit", SqlDbType.VarChar, 50);
comm.Parameters["@Debit"].Value = comboBox1.Text;
SqlDataAdapter adap = new SqlDataAdapter();
DataSets.DebitVoucherDataSet dataset = new DataSets.DebitVoucherDataSet();
DebitVoucherByDebitACCrystalReport crp = new DebitVoucherByDebitACCrystalReport();
try
{
conn.Open();
adap.SelectCommand = comm;
adap.Fill(dataset, "DataTable1");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
conn.Close();
}
crp.SetDataSource(dataset);
ParameterValues v = new ParameterValues();
ParameterDiscreteValue dv = new ParameterDiscreteValue();
dv = new ParameterDiscreteValue();
dv.Value = this.reportQuary;
v.Add(dv);
crp.DataDefinition.ParameterFields["report_query"].ApplyCurrentValues(v);
crystalReportViewer2.ReportSource = crp;
}
}
开发者ID:Jusharra,项目名称:RMS,代码行数:48,代码来源:DebitVoucherDebitACWiseReport.cs
示例10: load_pass
private void load_pass(CrystalReportPass crystal, string val)
{
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = val;
crParameterFieldDefinitions = crystal.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["idresep"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
}
开发者ID:ardX,项目名称:TCHusada,代码行数:16,代码来源:Report1.xaml.cs
示例11: load_pass
private void load_pass(transaksiugd crystal, string val)
{
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = val;
crParameterFieldDefinitions = crystal.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["pasien"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
}
开发者ID:ardX,项目名称:TCHusada,代码行数:16,代码来源:TransaksiUGD.xaml.cs
示例12: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!SessionBox.CheckUserSession())
{
Response.Redirect("~/Admin/Login.aspx");
}
else
{
//load crystal report
ReportDocument Report = new ReportDocument();
Report.Load(Server.MapPath("Sales_Return.rpt "));
//this.CrystalReportSource1.Report.FileName = Server.MapPath("Sales_order.rpt");
TableLogOnInfo logOnInfo = new TableLogOnInfo();
logOnInfo.ConnectionInfo.ServerName = "USER-3924AC2E56";
logOnInfo.ConnectionInfo.DatabaseName = "MyData";
logOnInfo.ConnectionInfo.UserID = "sa";
logOnInfo.ConnectionInfo.Password = "Goldjoint123";
//对报表中的每个表进行循环
for (int i = 0; i < Report.Database.Tables.Count; i++)
{
Report.Database.Tables[i].ApplyLogOnInfo(logOnInfo);
}
//load param
//CrystalDecisions.Web.Parameter param = new CrystalDecisions.Web.Parameter();
//param.Name = "OrderID";
//param.DefaultValue = Request.QueryString["TextBoxId"].ToString().Trim();
//add param
//this.CrystalReportSource1.Report.Parameters.Add(param);
ParameterValues ParamValues = new ParameterValues();
ParameterDiscreteValue ParamValue = new ParameterDiscreteValue();
ParamValue.Value = Request.QueryString["TextBoxId"].ToString().Trim();
ParamValues.Add(ParamValue);
Report.DataDefinition.ParameterFields[0].ApplyCurrentValues(ParamValues);
//bind
this.CrystalReportViewer1.ReportSource = Report;
//this.CrystalReportViewer1.ReportSourceID = this.CrystalReportSource1.ID;
//關閉左邊
this.CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
//強制安裝ActiveX
CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX;
this.CrystalReportViewer1.DataBind();
}
}
开发者ID:nick117,项目名称:ASP.NET.131,代码行数:47,代码来源:Sales_ReturnRPT.aspx.cs
示例13: AddParameter
public void AddParameter(string i_paramName, string i_paramValue, ParameterFields o_paramFields)
{
ParameterField paramField = new ParameterField();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
ParameterValues paramValues = new ParameterValues();
// Set the name of the parameter to modify.
paramField.ParameterFieldName = i_paramName;
// Set a value to the parameter.
paramDiscreteValue.Value = i_paramValue;
paramValues.Add(paramDiscreteValue);
paramField.CurrentValues = paramValues;
// Add the parameter to the ParameterFields collection.
o_paramFields.Add(paramField);
// Return paramFields
}
开发者ID:nguyendanhtu,项目名称:bki-quan-ly-du-toan,代码行数:18,代码来源:CReportParameterFields.cs
示例14: Run
public ModelOutput Run(ParameterValues parameters)
{
ModelOutput mf = new ModelOutput();
LoadDimensions(parameters, mf);
InitVariables(mf);
ConnectBindings(mf);
ConnectLeftoversToParameters(mf, parameters);
RunComponents(mf);
mf.SwitchOffChecks();
return mf;
}
开发者ID:VWille,项目名称:fund,代码行数:18,代码来源:Model.cs
示例15: button1_Click
private void button1_Click(object sender, EventArgs e)
{
this.reportQuary = dateTimePicker1.Text + " to " + dateTimePicker2.Text;
string query = "";
query = "Select * From tblBankStatement Where TransDate BETWEEN '" + dateTimePicker1.Value.Date + "' AND '" + dateTimePicker2.Value.Date + "' Order By AutoId";
if (query != "")
{
SqlConnection conn = new SqlConnection(this.connectionString);
SqlCommand comm = new SqlCommand(query, conn);
SqlDataAdapter adap = new SqlDataAdapter();
DataSets.BankDataSet dataset = new DataSets.BankDataSet();
BankStatementCrystalReport crp = new BankStatementCrystalReport();
try
{
conn.Open();
adap.SelectCommand = comm;
adap.Fill(dataset, "DataTable1");
crp.SetDataSource(dataset);
ParameterValues v = new ParameterValues();
ParameterDiscreteValue dv = new ParameterDiscreteValue();
dv = new ParameterDiscreteValue();
dv.Value = this.reportQuary;
v.Add(dv);
crp.DataDefinition.ParameterFields["report_query"].ApplyCurrentValues(v);
crystalReportViewer2.ReportSource = crp;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
conn.Close();
}
}
}
开发者ID:debrata,项目名称:Payroll,代码行数:44,代码来源:BankStatementReport.cs
示例16: Read
public void Read()
{
this.reportQuary = fromdateTimePicker.Text + " to " + todateTimePicker2.Text;
string query = "";
query = "Select * From TbAccountStatement Where CreateDate BETWEEN '" + fromdateTimePicker.Value.Date + "' AND '" + todateTimePicker2.Value.Date + "' Order By AutoId";
if (query != "")
{
SqlConnection conn = new SqlConnection(this.connectionString);
SqlCommand comm = new SqlCommand(query, conn);
SqlDataAdapter adap = new SqlDataAdapter();
AccountStatementDataSet dataset = new AccountStatementDataSet();
AccountStatementCrystalReport crp = new AccountStatementCrystalReport();
try
{
conn.Open();
adap.SelectCommand = comm;
adap.Fill(dataset, "DataTable1");
crp.SetDataSource(dataset);
ParameterValues v = new ParameterValues();
ParameterDiscreteValue dv = new ParameterDiscreteValue();
dv = new ParameterDiscreteValue();
dv.Value = this.reportQuary;
v.Add(dv);
crp.DataDefinition.ParameterFields["report_query"].ApplyCurrentValues(v);
crystalReportViewer1.ReportSource = crp;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
conn.Close();
}
}
}
开发者ID:debrata,项目名称:Payroll,代码行数:43,代码来源:AccountStatementForm.cs
示例17: AddParameter
private ParameterFields AddParameter(string paramName, string paramValue, ParameterFields paramFields)
{
ParameterField paramField = new ParameterField();
ParameterDiscreteValue paramDiscreteValue = new
ParameterDiscreteValue();
ParameterValues paramValues = new ParameterValues();
// 设置要修改的参数的名称。
paramField.ParameterFieldName = paramName;
// 为该参数设置一个值。
paramDiscreteValue.Value = paramValue;
paramValues.Add(paramDiscreteValue);
paramField.CurrentValues = paramValues;
// 将该参数添加到 ParameterFields 集合中。
paramFields.Add(paramField);
return paramFields;
}
开发者ID:henrydem,项目名称:yongfa365doc,代码行数:19,代码来源:frmCrystalReport.cs
示例18: StartingDeploy
public void StartingDeploy(AsimovVersion newVersion, string logFileName, AsimovUser user, string correlationId, ParameterValues parameters)
{
DeployStatus = DeployStatus.Deploying;
Version = new DeployedVersion
{
DeployTimestamp = DateTime.Now,
VersionId = newVersion.Id,
VersionNumber = newVersion.Number,
VersionBranch = newVersion.Branch,
VersionTimestamp = newVersion.Timestamp,
VersionCommit = newVersion.Commit,
LogFileName = logFileName,
UserId = user.UserId,
UserName = user.UserName,
DeployFailed = false,
CorrelationId = correlationId,
Parameters = parameters.GetInternalDictionary()
};
NotificationPublisher.PublishNotifications(new DeployStartedEvent(Name, Version));
}
开发者ID:mullvaden,项目名称:asimov-deploy-winagent,代码行数:21,代码来源:DeployUnit.cs
示例19: fmProjectCosting_Load
private void fmProjectCosting_Load(object sender, EventArgs e)
{
crystalReportViewer1.Top = 0;
try
{
ReportDocument cryRpt = new ReportDocument();
string dir = System.IO.Directory.GetCurrentDirectory();
dir = "Default_ProjectCost.rpt";
cryRpt.Load(dir);
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
crParameterDiscreteValue.Value = orderid;
crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions["orderid"];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
crystalReportViewer1.ReportSource = cryRpt;
//crystalReportViewer1.RefreshReport();
}
catch (LogOnException)
{
MessageBox.Show("Incorrect Logon Parameters. Check your user name and password.");
}
catch (DataSourceException)
{
MessageBox.Show("An error has occurred while connecting to the database.");
}
catch (EngineException ex)
{
MessageBox.Show (ex.Message);
}
}
开发者ID:JeromeVancouver,项目名称:NorthwestInventoryManager,代码行数:40,代码来源:fmProjectCosting.cs
示例20: setReport
private void setReport(string[] discretes, string[] values, ReportDocument reportSource)
{
ParameterFieldDefinitions crParameterFieldDefinitions;
ParameterFieldDefinition crParameterFieldDefinition;
ParameterValues crParameterValues = new ParameterValues();
ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
for (int i = 0; i < discretes.Length; i++)
{
crParameterDiscreteValue.Value = values[i];
crParameterFieldDefinitions = reportSource.DataDefinition.ParameterFields;
crParameterFieldDefinition = crParameterFieldDefinitions[discretes[i]];
crParameterValues = crParameterFieldDefinition.CurrentValues;
crParameterValues.Clear();
crParameterValues.Add(crParameterDiscreteValue);
crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
}
crystalReportViewer1.ReportSource = reportSource;
crystalReportViewer1.Refresh();
}
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:22,代码来源:Modul_Laporan_Arus_KasKecil_ByTransaksi.cs
注:本文中的ParameterValues类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论