Ch 8, Crystal Reports Engine, "Set D.B. Location"
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.InvalidArg umentException' 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?
|