Crystal report Tables not visible after the Load statement.

I am using VS 2008 to create a VB program that has embedded reports. I cannot get one of the reports to run from within the project. The report does display data in PREVIEW mode. However when I LOAD the report from the project code, I cannot see the tables.
In the attached code when I place my cursor over the cryRpt.Database.Tables object I see a "+" sign. The "+" sign will display a Table Count property. And it is 0 for this report. It should be 5.
What is causing the report to not load the tables?

I built a second duplicate report because I had to get it done. The second report runs fine. I just want to understand what is occurring. I don't want to have to recreate future reports if this problem occurrs again.

Thanks,
pat
Dim cryRpt As New ReportDocument
        '
        Dim crtableLogoninfos As New TableLogOnInfos
        Dim crtableLogoninfo As New TableLogOnInfo
        Dim crConnectionInfo As New ConnectionInfo
        Dim CrTables As Tables
        Dim CrTable As Table
        'MsgBox(Main.ReportFileString.ToString.Trim)
        cryRpt.Load(Main.ReportFileString.ToString.Trim)
        '

'I put a break here and after the LOAD statement I check the TableCount property of the cryRpt.Database.Tables object. It is 0. It should be 5. Why?
        With crConnectionInfo
            .ServerName = Main.ServerNameStringPublic
            .DatabaseName = "GMF"
            .UserID = "Reports"
            .Password = "reports"
        End With
        '
        CrTables = cryRpt.Database.Tables
        For Each CrTable In CrTables
            crtableLogoninfo = CrTable.LogOnInfo
            crtableLogoninfo.ConnectionInfo = crConnectionInfo
            CrTable.ApplyLogOnInfo(crtableLogoninfo)
        Next

Open in new window

mpdillonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Does your other one work?

Is it the same code?  

WHat does it say at the same point?

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mpdillonAuthor Commented:
mlmcc
Yes, the "identical" report does work. At the same point I put a break point. I inspect the cryRpt.Database.Tables object. The first property of this object is COUNT. In the orginal report which does not work, COUNT = 0. In the new report which does work, the COUNT is 3.
0
mlmccCommented:
I don't know.  Perhaps the original report has an error in it.

Can you open that report and change it?

Can you do a VERIFY DATABASE on it?

mlmcc
0
mpdillonAuthor Commented:
Nothing resolved the issue. The report still does not work from code. Since I have already recreated the report, I will just close this question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.