locked
Crystal Reports prompt issue on export: “The report you requested requires further information” RRS feed

  • Question

  • User322452319 posted

    I have searched through forums for a solution but none seem to work for me.

    I have an ASP Webform/MySql application which displays Crystal Reports.

    The ones which do not require a user to enter a parameter display fine and I am able to click on export on the CR toolbar and download, e.g. .pdf format.

    On the report that require a user to enter a parameter, the report renders fine but when I click on the export button, i get the prompt:

    "The report you requested requires further information"

    asking for DB login credentials. How can I avoid this?

    My Code:

     protected void Page_Load(object sender, EventArgs e)
            {
                if (Request.QueryString["report"] != null)
                {
                    string reportToGet = Convert.ToString(Request.QueryString["report"]);
    
                    switch (reportToGet)
                    {
                        case "payslip":
                            PaySlip();
                            break;
                        case "pastpayslip":
                            PanelPastPaySlip.Visible = true;
                            break;
                        case "paysummary":
    
                            break;
                        case "pastpaysummary":
    
                            break;
                        default:
                            break;
                    }
                }
            }
     protected void btnSearch_Click(object sender, EventArgs e)
     {
          if (txtDate.Text != null || txtDate.Text != string.Empty)
               if (DateTime.TryParseExact(txtDate.Text, "yyyy-MM-dd", CultureInfo.InvariantCulture,
                           DateTimeStyles.None, out date))
                   PastPaySlip();
     }



    private void PastPaySlip()
    {
    // Some code.....
    PayMasterDataSetTableAdapters.pastpayslipcasualviewTableAdapter ta = new PayMasterDataSetTableAdapters.pastpayslipcasualviewTableAdapter(); PayMasterDataSet.pastpayslipcasualviewDataTable dt = new PayMasterDataSet.pastpayslipcasualviewDataTable(); ta.FillBy(dt, userId, businessId); cReport = new ReportDocument(); string reportPath = Server.MapPath("~/Views/CasualLabour/Reports/PastPaySlip.rpt"); cReport.Load(reportPath); cReport.SetDataSource((DataTable)dt); cReport.SetParameterValue("Date", date); CrystalReportViewer1.ReportSource = cReport; CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
    Wednesday, August 13, 2014 7:28 PM

All replies