locked
The report you requested requires further information. asp.net and c# RRS feed

  • Question

  • User1127247806 posted

    hi frd,

    first i aspx page dropdownlist box which is show data from database and when i select the dropdown list value then i click display button i will the selected value in the report . then i make dataset then i make crystal report design and i make paramater which name is id, when i run the page its make me error

    The report you requested requires further information.

     

    this is my web.confiq file connection string

    <connectionStrings>
            <remove name="LocalSqlServer"/>
            <add name="LocalSqlServer" connectionString="Data Source=MONIR\SQLEXPRESS;Initial Catalog='D:\ERP_APP\APP_DATA\ERPAPP.MDF';Integrated Security=True" providerName="System.Data.SqlClient"/>
            <add name="ERPConnStr" connectionString="Data Source=MONIR\SQLEXPRESS;Initial Catalog='D:\ERP_APP\APP_DATA\ERPAPP.MDF';Integrated Security=True" providerName="System.Data.SqlClient"/>
            <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ERPAPP.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
        </connectionStrings>
      

     this is my .aspx page

    ===================

    <form id="form1" runat="server">
        <div><table>
        <tr><td>Account No</td><td>
                        <asp:DropDownList ID="ddlCategory" runat="server">
                        </asp:DropDownList>
                       
                        <asp:Button ID="btndisplay" runat="server" onclick="btndisplay_Click"
                            Text="Show Report" />
                        </td></tr>
       
       
        </table></div>
        <div>
           
            <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"

    Height="50px" ReportSourceID="CrystalReportSource1" Width="350px"
                HasRefreshButton="True" />

    <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">

    <Report FileName="SingleBrkReport.rpt">

    </Report>

    </CR:CrystalReportSource>

           
           
        </div>
        </form>

     

    and this is c# code behind

    ====================

    using System;

     

    using System.Data;

     

    using System.Configuration;

     

    using System.Web;

     

    using System.Web.Security;

     

    using System.Web.UI;

     

    using System.Web.UI.WebControls;

     

    using System.Web.UI.WebControls.WebParts;

     

    using System.Web.UI.HtmlControls;

     

    using System.Data.SqlClient;

     

    using CrystalDecisions.CrystalReports.Engine;

     

    using CrystalDecisions.Shared;

     

    public partial class SingleBrokerAccReport : System.Web.UI.Page

    {

        private ReportDocument report = new ReportDocument();

     

        protected void Page_Load(object sender, EventArgs e)

        {

     

     

     

            if (!Page.IsPostBack)

            {

     

                BindData();

     

            }

     

     

        }

        protected void btndisplay_Click(object sender, EventArgs e)

        {

            report = new ReportDocument();

     

            string reportPath = Server.MapPath("SingleBrkReport.rpt");

            report.Load(reportPath);

     

            int acc = Convert.ToInt32(ddlCategory.SelectedValue);

     

            //report.SetParameterValue("id", acc);

            report.SetParameterValue("id", acc);

            //report.SetDataSource(ds);

     

            CrystalReportViewer1.ReportSource = report;

        }

     

        protected override void OnUnload(EventArgs e)

        {

     

            base.OnUnload(e);

     

            this.Unload += new EventHandler(Page_Unload);

     

        }

     

        public void Page_Unload(object sender, EventArgs e)

        {

     

            // clean up the resources

     

            report.Clone();

     

            report.Dispose();

     

        }

     

        private void BindData()

        {

     

            System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["ERPConnStr"].ConnectionString);

           System.Data.SqlClient.SqlDataAdapter ad = new System.Data.SqlClient.SqlDataAdapter("SELECT id FROM broker", conn);

     

            DataSet ds = new DataSet();

     

            ad.Fill(ds);

     

            ddlCategory.DataSource = ds;

     

            ddlCategory.DataTextField = "id";

            ddlCategory.DataBind();

    }

    }

     

    any one h elp me how can i solve it

    thanks in advance

    Monday, January 30, 2012 8:59 AM

Answers

  • User1196771204 posted

    hi there,

    I believe this issue has been addressed on http://forums.asp.net/t/1026635.aspx/1/10  

    For crystal report hosting, you can check out asphostcentral.com 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 30, 2012 10:19 PM

All replies

  • User1196771204 posted

    hi there,

    I believe this issue has been addressed on http://forums.asp.net/t/1026635.aspx/1/10  

    For crystal report hosting, you can check out asphostcentral.com 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 30, 2012 10:19 PM
  • User1127247806 posted

    hi necro mancer,

    this work fine,

    i have another problem 3 days i trying but i cant slove localy crystal report work fine when i run from server crystal report is not comming long time can u advise me how can i slove this problem. i used vs2008  and crystal report 2008. some one said to me need to install CR runtime where i can find this can u advice me

    Friday, February 3, 2012 3:48 AM
  • User1196771204 posted

    Hi manirul,

    Running a crystal report on the server can be quite a headache for the first time :)

    You need to make sure that the crystal report assemblies do match the crystal report version installed on the server. If you need any assistance in hosting your crystal report, you can contact asphostcentral.com.

    Hope this helps 

    Friday, February 3, 2012 8:39 PM