Subject: Ch 8, Crystal Reports Engine, "Set D.B. Location"
Posted By: wpeck Post Date: 1/30/2004 3:08:33 PM
I am working through Chapter 8, using the downloaded code as is. When trying to run the application to get the Employee Listing, that works fine (p. 247).

But when clicking on the "Set Database Location" button, the solution dies on this line of code:

      If myTable.Location.ToString() = "Employee" Then
--->                myTable.Location = "Employee_Current"
      End If

The error message is :
An unhandled exception of type 'CrystalDecisions.CrystalReports.Engine.InvalidArgumentException' occurred in crystaldecisions.crystalreports.engine.dll

Additional information: Error in File C:\DOCUME~1\Owner\LOCALS~1\Temp\temp_9c205921-890b-4f0c-b621-a30f69d3da82.rpt:
Invalid table number.

I have set up the Employee_Current table as suggested.

I get the same error if I "change" the line of code to
      If myTable.Location.ToString() = "Employee" Then
--->                myTable.Location = "Employee",
      End If

meaning that I'm not really changing the value.

If I comment the whole thing out, it works fine, and the report pulls back data from the Xtreme.Employee table.

What's causing this line of code to fail?





Go to topic 9215

Return to index page 958
Return to index page 957
Return to index page 956
Return to index page 955
Return to index page 954
Return to index page 953
Return to index page 952
Return to index page 951
Return to index page 950
Return to index page 949