Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

incorrect logon parameters

Status
Not open for further replies.

teztr

Programmer
Oct 24, 2007
1
GB
hi everyone, hope you can help as this has been driving me crazy for days now.
I'm trying to show a report on an asp webpage which is populated with data from an sql server database.
I've created a report in visual studio2005 and told it to use an ado.net dataset to get its data. I'm then able to drag and drop the database fields onto my report as required.

when i drop a crystal report viewer control onto my web page, create a reportsource control which loads my report and then run the page in a browser i get the following message:-
Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File
testreport.rpt Unable to connect: incorrect log on parameters

I've searched high and low on the net for the solution for this but nothing seems to work.

I also created a report in standalone crIX which uses a dsn to connect to the db and pull back its data. When I tell the reportsource control to use this report it displays the report with no problems, so the problem seems to be specific to retrieving data from this dataset.

When i enable database logon prompting in the reportviewer control i am asked to log into the dataset for some reason too.

There are no strange security permissions set up on any files used by the website or indeed the database itself.

The dataset itself seems fine as I replaced the crystal report with a gridview using the same dataset and this displays the data with no problems whatsoever.

I'm ready to throw crystal out at the moment so PLEASE help me if you can!

Thanks
 
You have to do two things when setting this up in the viewer - set the DataSource for the report and then set the ReportSource for the viewer.

I haven't done this in ASP.NET, but I've done it in WinForms with C#, which should be similar. I override the constructor for the viewer form so that I can pass the DataSet into it (I also tell it which of the two reports in the app to run. Here's what the code looks like:
Code:
public BOEAuditRptViewer(DataSet dsAuditInfo, 
  AuditRptType rptType)
{
  InitializeComponent();
  switch (rptType)
  {
    case AuditRptType.GroupUsers:
      ConfigureGroupUserReport(dsAuditInfo);
      break;
    case AuditRptType.ReportGroups:
      ConfigureReportGroupReport(dsAuditInfo);
      break;
  }
}

private void ConfigureGroupUserReport(DataSet dsAuditInfo)
{
  this.Text = 
     "BusinessObjects Audit Report - Groups with Users";
  BOEGroupUsersRpt auditRpt = new BOEGroupUsersRpt();
  auditRpt.SetDataSource(dsAuditInfo);
  auditRptViewer.ReportSource = auditRpt;
}

I hope this help to point you in the right direction.

-Dell




A computer only does what you actually told it to do - not what you thought you told it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top