Hi,

my code is

 protected void Page_Load(object sender, EventArgs e)
    {

        DataSet1 ds = new DataSet1();
        string strConn =
ConfigurationManager.ConnectionStrings["BillDtsConnectionString"].ConnectionString;
        SqlConnection conn = new SqlConnection(strConn);
        string str = "select * from bill";
        SqlDataAdapter da = new SqlDataAdapter(str, conn);
        da.Fill(ds, "Bill");

        ReportDocument rptDoc = new ReportDocument();

        rptDoc.Load(Server.MapPath("CrystalReport1.rpt"));
        rptDoc.SetDataSource(ds.Tables["product"]);
     CrystalReportViewer1.ReportSource = rptDoc;
        CrystalReportViewer1.DataBind();
}

When i run this code am getting error as

Logon failed. Details: crdb_adoplus : Object reference not set to an
instance of an object. Error in File C:\DOCUME~1\AS\LOCALS~1\Temp\

CrystalReport1 {786134AC-53BE-4210-9505-FC7F13188C03}.rpt: Unable to
connect: incorrect log on parameters.

Can u say how to clear this one?






On Tue, Feb 24, 2009 at 9:01 PM, Manikandan .C <[email protected]>wrote:

> Dear Vanitha
>
> Are you created a object of Crystal report?
>
> Then set file Properties of Crystal report object like as Database, etc
>
> Manikandan.C
>
>
> On 2/25/09, vanitha palanisamy <[email protected]> wrote:
>>
>> Hi folks,
>>
>>
>>
>> Am using crystal report in asp.net.Am <http://asp.net.am/> dynamically
>> creating dataset for crystal report.
>>
>> But when i run the report am getting error as
>>
>>
>>
>> Logon failed. Details: crdb_adoplus : Object reference not set to an
>> instance of an object. Error in File
>> C:\DOCUME~1\AS\LOCALS~1\Temp\CrystalReport1
>> {786134AC-53BE-4210-9505-FC7F13188C03}.rpt: Unable to connect: incorrect log
>> on parameters.
>>
>>
>>
>> Could anyone help?
>>
>
>

Reply via email to