Adding a Subreport to existing report and getting this error, "Unable to connect: incorrect log on parameters"

I have taken on an existing vb.net project done in Visual Studio 2008 with crystal reports version Crystal Report XI.
The reports on their own work very well. Problem is I need to add information to my report which is a 'many-to-one' situation where for each Project Id that I am displaying I need to display several attached documents and the report I am working on is for several Project Id's.
I figured this would be a perfect situation for a SubReport. I created a separate report which calls a stored procedure to get all of the Attached Documents for a specific Project Id. I thought if I were to add this new SubReport to the Original Report and link the Project Id's, easy-peazy, I would be done.
This is not the case. I have vb code that loads the Original Report with a stored procedure and when this code runs with the setup I described above it fails when it is creating the final report with the following error:
Logon failed. Details: crdb_adoplus : Object reference not set to an instance of an object. Error in File C:\~\ProjectDescriptionReport {6BA19F79-2A12-4826-B1F6-456EF799963B}.rpt: Unable to connect: incorrect log on parameters.
I have no specific connections in my vb code for the reports. If I do not add the subreport to the main report, it loads correctly, so I know the error is caused by the subreport.
This is the code that creates the original report (sorry for dumping the code here, i just thought it would be easier to see all the code) :
Public Function LoadReport(ByVal inProjectNum As Integer, ByVal strProjectName As String) As DataTable ', ByVal inFiscalYear As Integer, ByVal inCompany As String) As DataTable
        Dim cnn As SqlConnection = Nothing
        Dim cmd As Data.SqlClient.SqlCommand
        Dim obj As New clsDataClass
        Dim dataAdapter As SqlClient.SqlDataAdapter
        Try
            LoadReport = New DataTable("DescriptionReport")
            cmd = New SqlCommand()      
            cnn = obj.Create_Connection()
            With cmd
                .CommandType = Data.CommandType.StoredProcedure
                .Connection = cnn
                .CommandTimeout = "60"
                .CommandText = "usp_GetProjectGroupSpecsCR"              
                .Parameters.AddWithValue("@ProjectNumber", inProjectNum)
                .Parameters.AddWithValue("@ProjectName", strProjectName)
            End With
            dataAdapter = New System.Data.SqlClient.SqlDataAdapter
            dataAdapter.SelectCommand = cmd
            dataAdapter.Fill(LoadReport)
            Dim oRpt As New ReportDocument()
            oRpt.Load(Server.MapPath("ProjectDescriptionReport.rpt"))
            oRpt.Refresh()
            oRpt.SetDataSource(LoadReport)
            'oRpt.OpenSubreport("AttachmentsReport").SetDataSource(LAR)
            oRpt.SetParameterValue("inProjectNum", inProjectNum)
            oRpt.SetParameterValue("strProjectName", strProjectName)
            oRpt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "Projects_DescriptionReport") 'inCompany & "ProjectsReport_Description" & inFiscalYear) <-- Line where the error occures.
What I need to know is what is the proper way to add a subreport to a vb.net application?
From the ways I have tried it is clearly not working and I am out of ideas. I am fairly new to Crystal Reports and this way of coding it.
Any help for this would be greatly appreciated, I've been stuck on this for a while and am finally reaching out to the Crystal Report Specialists.
Thank you in advance,
Bryan

Hi Bryan,
You may want to check the Connection properties also. I think the MS Data.SqlClient.SqlCommand is using the MDAC driver, or could be modified.
If you are connecting to SQL Server 2008 or above you should be using the SQL Native 10 or 11 Client.
As Dell suggests have a look at the samples and if you can use a DSN ( 32 bit or 64 bit ODBC Admin )
Also search for "CRlogger", you'll find how to enable CR's database logging component and may help show you what part is failing.
Don

Similar Messages

  • Crystal Reports Server :Unable to connect: incorrect log on parameters

    Hi there, I am getting the following error in Crystal Reports Server  when i try to preview or schedule a Crystal Report on an Access 2000 database.
    Unable to connect: incorrect log on parameters
    The Access database does not have has not username or password and I have left these blank when publishing it, and the Database properties in the Central Management Console also show the username and password as blank.
    All other reports are fine is it just reports on the Access 2000 database that give me this errror.
    Anyone any ideas.
    Thanks

    Hi,
    ok now you have to make ure that the user used to run the BOBJ services on your BO server (if you hvae windows then this is the local system account), has access to your AccessDB. Normally local users do not have access to network locations so it is advisable to create a domain user, who is allowed to access the directory with your database and is melber of the local administrators group on the BOBJ server. All you have to do then is to  configure your BOBJ services (Use the Central Configuration Management utility to do this) to run under the credentials (Log-on-as) of user you created.
    Regards,
    Stratos

  • Unable to connect: incorrect log on parameters - In CMC / CR report

    I have a CR report that connects to an AS400 and an Excel file.  The Excel file is on a Network Drive, and I've made sure that the drive is mapped on my server that the Crystal Reports Server is on.  I can sucessfully run this report on this same server in CR XI.  However, when I try to Preview or Run Now from the CMC, it says "Unable to connect: Incorrect log on parameters".
    I do not have a password on the Excel file, but this is where the problem seems to be.  Any ideas?

    In case you use CR Server 2008 you won't find services for cache and page server. These services are integrated and controlled by the SIA (Server Intelligent Agent) service.
    Start you CCM (Central Configuration Manager), Select Server Intelligent Agent, Right click and choose properties, Untick System Account and provide a user (domain) account which has sufficient rights to access your folder.
    Regards,
    Tim

  • Anyone else getting this error: unable to connect to itunes in the cloud?

    After iTunes 11 upgrade, I now get this error all the time and syncing and backing up my iDevices won't work.

    Same here. Posted earlier:
    mculmore
    Dec 13, 2012 5:56 PM 
    All the items purchased and in Cloud disappeared and the little cloud icon shows the wavy diagonal lines trying to connect, it fails to connect and a dialog informs that it "cannot connect to the cloud", but no other internet problems are present. Then the little cloud icon just disappeared and does not or has not come back. Movies, TV shows, Music are all gone right now. Anyone else with this issue? Apple System Status says all is green.

  • I'm trying to export a list to Excel and I'm getting this error: "unable to download owssvr.dll"

    Hi, 
    Help, please.
    I’m trying to export a list to Excel and I’m getting this error: "unable to download owssvr.dll"
    Thanks in advanced.

    Hi,
    According to your post, my understanding is that you got the error "unable to download owssvr.dll" when exporting a list to Excel.
    owssvr.dll is the module given by Microsoft to read the data from SharePoint Lists using remote procedure call.
    You can find the OWSSVR.DLL in SharePoint 2010 Server Physical Path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI.
    Please check whether it exists in SharePoint 2010 Server Physical Path.
    Please check whether you export a list to Excel correctly.
    Generally, the issue is caused by the brower. Please reset the IE to check whether it works.
    In addition, you can repair the Office to check whether it works.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/5f471d53-e980-4acc-a6cb-7c8722571ec0/problem-with-export-to-spreadsheet?forum=sharepointgenerallegacy
    More information:
    SharePoint RPC Protocols Examples Using OWSSVR.DLL
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Trying to download I tunes and get this error message Service " Apple Mobile Device" ( Apples Mobile Device) failed to start. Verify that you have sufficent privileges to start system services

    Trying to download I tunes and get this error message Service " Apple Mobile Device" ( Apples Mobile Device) failed to start. Verify that you have sufficent privileges to start system services

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Trying to install iTunes and get this error: "The installer encountered errors before iTunes could be configured   Errors occurred during installation. Your system has not been modified"

    HELP!!!
    I am trying to install iTunes on my Windows 7 laptop and get this error:
    "The installer encountered errors before iTunes could be configured   Errors occurred during installation. Your system has not been modified"
    Arghhhhh!! I've tried different browsers and various other things suggested on other posts to no avail  

    Ok people, I think I have found the solution !
    If you click on the start button from your desktop screen.
    Then in the "search programs and files" field type : apple software update - you can find the apple installer.
    Click on the apple software update line and let the machine run it's course. I recommend updating whatever it wants to , ie: safari 5, quicktime, itunes....
    I then restarted my computer and it seems to be working now !
    Good luck everyone !

  • I am trying to update Photoshop & Premier Elements 11 and get this Error Code: U43M1D207

    I am trying to update both Photoshop & Premier Elements 11 and get this Error Code: U43M1D207.
    Can anyone help ?

    Try downloading the updates manually from http://www.adobe.com/downloads/updates/
    Thanks
    Nikhil

  • TS3694 1015 ? I'm trying to update my iPhone 3 and get this error message. The phone belonged to my wife, and I'm trying to restore it to factory settings as new owner. Any ideas?

    1015 ? I'm trying to update my iPhone 3 and get this error message. The phone belonged to my wife, and I'm trying to restore it to factory settings as new owner. Any ideas?

    Before beginning the download, try temporarily disabling your antivirus, anti-adware, anti-spyware, and any other anti-whatever that is required with the secure OS your computer is running.

  • Getting an error unable to connect to iTunes when I try to download games through apples app, says try again when I do it gives me an Fatal error unable to connect?

    Getting an error unable to connect to iTunes when I try to download games through apples app, says try again when I do it gives me an Fatal error unable to connect?

    Hi LeAnn,
    There have been several posts tonight with this issue. I would suggest waiting until tomorrow and then try again. There may be an issue with the server you are connecting to.
    Cheers,
    GB

  • When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    When I try to use the internal hard drive as a scratch disk I get this error "unable to set scratch disk- the selected directory is on write protect or non-writable media.  Any ideas on how to fix this.  It only happens in fcp.

    By internal, I assume you're referring to your systems (boot) drive. Is it, by chance, a partitioned dive?
    Also…although many people successfully use their systems drives as scratch disks, over time you'll have better results using a dedicated drive for your media.
    Good luck.
    Russ

  • TS3899 getting an error, "unable to connect to server" when trying to access his yahoo email account. no different user name/wifi is off.

    getting an error, "unable to connect to server" when trying to access yahoo email account.  I did not change my password, but now everytime I try to access my email from my IPhone 4s, I get the error.

    Try the Yahoo mail app.

  • Trying to copy files and getting this error message, One or more items can't be copied because you don't have permission to read them. this is really annoying, can someone pls help..?

    i have two network drive and i am trying to copy a file from my mac mini to one of the network drives, but i keep getting this error message "One or more items can’t be copied because you don’t have permission to read them." i have no idea why this is since i have always been able to copy stuff back and forth. i checked my file sharing permissions and it is set to read and write for admin (me), none for everyone and read for guests. can someone please, this is very annoying and this is the second time it has happened to me.

    neither move nor copy is working. both way gives same error message. what i would like to do however is move the file. yes i am logged in as a the admin and the issue is affecting not just that particular file in my system but others as well. i looked at get info and no the file is not locked but under permission, it says everyone and read only. it will not let me change this setting from get info however when i look under system preferences for file sharing, my setting is read and write for admin (me), none for everyone and read for guests.

  • HT4623 I am trying to update my iphone 4s and get an error message not connected to internet

    I am trying to update my iphone 4S and get an error message that I am not connected to the internet

    Okay, so connect.
    Either via Wi-Fi or enable Cellular Data in settings.

  • I can't export and get this error message...

    So I've been working on a video project for several weeks now... but when I go to export the file to any format, or site like Facebook, Vimeo, Youtube, etc I get this error message...
    (com.apple.Compressor.CompressorKit.ErrorDomain error -1.)
    I have no idea what it means or how to fix it. I tried just googling some answers but no luck. Anyone here able to help?
    Cheers

    If you are using the original version 10.0 with Mavericks then you simply update to the newer FCP X 10.1.1.
    Be aware that this new version is very different in some ways particularly with the way media is managed.
    There is now the Library method of storing Projects and Events within Libraries.
    Older Projects and Events require an internal FCP X UPDATE process.
    See here for the basics:
    FCP X setup
    Al

Maybe you are looking for

  • Firefox ClassNotFoundException (works in IE6)

    Hi all, I've recently rebuilt a java application with about ten classes in the default package - rather than buried in a package three layers down. Now, instead of running in IE6 and Firefox as it did before, it only works in IE. Anyone got any ideas

  • ORA-01401: inserted value too large for column

    I am updating a couple dozen columns with this program. Is there a way to include the column name that caused the error in this message? Thanks H

  • ITunes 7.0.2 relentlessly relaunches after I quit it.

    iTunes 7.0.2 relentlessly relaunches after I quit it. in 2 seconds. only way to quit it is to log out / in - but once iTunes is launched, it prefers to stay that way. help?

  • Filemaker 7 to Address Book 3.1.2 ?

    Hello, I am trying to import records from Filemaker 7 to Address Book 3.1.2 . It does not seem possible and I am seeking advice. I am soon upgrading to an intel Mac, however my aim is to not use Filemaker anymore, so I figured if I could get all my r

  • JSP & JavaBean: setProperty="*" problems!

    this is my bean: package my.mine; public class myBean{   private String sito;   private String chiave;    private int start;   private int stop;   public void setSito(String s){     System.out.println("sito " + s);     if(s!=null || !s.equals(""))