且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在winform c#中使用数据集xsd重置晶体报告

更新时间:2023-02-10 08:31:31

你应该 RefreshReport [ ^ ]。查看这些以供参考

将参数传递给水晶用C#报告 [ ^ ]

使用c#在运行时将参数传递给Crystal Reports [ ^ ]


hello ! here ,I want to print a crystal report on invoice no.. When i submit product details,it prints on that invoice number but, here is the problem that when i submitted my next product detail
it could not print crystal report on present parameter value means invoice number, it added all current details to the previous details and show previous invoice number.
Please! Give provide a solution .I am not habitual with windows form.Its a Sale invoice project which is my first project.
here is some parts of code:

private void Report_Load(object sender, EventArgs e)
{


CrystalReport1 cryRpt = new CrystalReport1();

ParameterField paramField = new ParameterField();
paramField.Name = "BillNo";
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = a;
paramField.CurrentValues.Add(paramDiscreteValue);
ParameterFields paramFields = new ParameterFields();
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;

}

You should RefreshReport[^]. Check these for reference
Passing parameters to crystal reports in C#[^]
Passing parameters to Crystal Reports at runtime with c#[^]