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

  • Question

  • User1127247806 posted

    error is that The report you requested requires further information. server name,database,userid password its want .

     

    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>

    i make dataset

    and this is my code

     

    using System;
    using System.Collections;
    using System.Configuration;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Xml.Linq;
    using System.Data.SqlClient;
    using System.Web.Configuration;

    //using System.Data.SqlClient;

    using CrystalDecisions.CrystalReports.Engine;

    using CrystalDecisions.Shared;

    public partial class Broker_accholder_informationReport : System.Web.UI.Page
    {
        private ReportDocument report = new ReportDocument();
       //ReportDocument.SetDatabaseLogon("", "");
       
        //new ReportDocument
       
        protected void Page_Load(object sender, EventArgs e)
        {
            //BindData();
            if (Session["emma"] == null)
            {
                Response.Redirect("erp.aspx");
            }
            else
            {
                //TextBox1.Text =(String(Session["emma"]);

            }
        }
       
       

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
           // DataBind();
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["ERPConnStr"].ConnectionString;
            int id = Convert.ToInt32(DropDownList1.SelectedValue);
            string selectQuery = @"Select * from broker where id=@id";

            SqlConnection myConnection = new SqlConnection(connectionString);
           

            SqlCommand myCommand = new SqlCommand(selectQuery, myConnection);

            myCommand.Parameters.AddWithValue("@id",id);



            SqlDataAdapter ad = new SqlDataAdapter(myCommand);

           DataSet ID = new DataSet();

            ad.Fill(ID, "broker");
            //reportfile

            report.FileName = Server.MapPath("ProjectReport.rpt");
            report.SetDatabaseLogon
                ("", "", @"MONIE\SQLEXPRESS", "ERPAPP");
           


            report.SetDataSource(ID);



            CrystalReportViewer1.ReportSource = report;    
        }
    }

     

    can u help anyone how can i slove this problem

     

    thanks in advance

    Sunday, January 29, 2012 10:51 AM

Answers

  • User-1433030747 posted

    http://forums.asp.net/t/1026635.aspx/1/10

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 29, 2012 12:35 PM

All replies

  • User-1433030747 posted

    http://forums.asp.net/t/1026635.aspx/1/10

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, January 29, 2012 12:35 PM
  • User1127247806 posted

    thanks but i can show only all data from table i cannot find single data suppose acc no from table which i will show crystall report

    Monday, January 30, 2012 9:03 AM