Skip to Content
0
Aug 14, 2014 at 09:22 AM

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

202 Views

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:


Aspx page:

......

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

.....

<div>

<CR:CrystalReportViewer Width="960px" ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />

</div>

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;
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);

cReport.SetDatabaseLogon("userID", "password", "server", "database");

CrystalReportViewer1.ReportSource = cReport;

CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;

}

I am using CR V. 13.0.9 and VS 2013 Update 2