开发者

Crystal Report Viewer for Web

I make a Crystal Report for web application. But I have a problem, when start the page Default.aspx this shows other textBox and other button, to enter the parameter for my stored procedure and then generate the report.

But I need use my TextBox and my button for called the stored procedure and shows in CrystalReportViewer. This is the code for the button event:

 protected void getReportButton_Click(object sender, EventArgs e)
    {
        ReportDocument reporte = new ReportDocument();
        ParameterField parameterField = new ParameterField();
        ParameterFields parametersFields = new ParameterFields();
        ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
        parameterField.Name = "@id_Boleta";
        parameterDiscreteValue.Value = Int32.Parse(txbNumeroBoleta.Text);
        parameterField.CurrentValues.Add(parameterDiscreteValue);
        parametersFields.Add(parameterField);
        C开发者_JAVA百科rystalReportViewer1.ParameterFieldInfo = parametersFields;
        reporte.Load("K:/INEC/Reportes/ReporteErroresBoletaWeb/CrystalReport1.rpt");
        CrystalReportViewer1.ReportSource = reporte;
    }

and here is the error how is loading

Crystal Report Viewer for Web

the page

Crystal Report Viewer for Web

How can I shows only my correct control to generate the report??


You can hide the Crystal Report parameter prompt using

CrystalReportViewer1.EnableParameterPrompt = false; in your page load event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜