By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,406 Members | 2,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,406 IT Pros & Developers. It's quick & easy.

Invalid Table Name in Crystal .NET

P: n/a
cj
Has anyone come across the following error in running a Crystal Report in
ASP.NET using the Crystal Reports Web Viewer control...

CrystalDecisions.CrystalReports.Engine.InvalidArgu mentException: Error in
File c:\..\..\..\..\InvoiceReport.rpt: Invalid table number.

It happens when trying to set the location for each table in the report

1 For Each objReportTable In rptInvoice.Database.Tables
2 Dim objTableLogOnInfo As TableLogOnInfo = objReportTable.LogOnInfo
3 objTableLogOnInfo.ConnectionInfo = objConn
4 objReportTable.ApplyLogOnInfo(objTableLogOnInfo)
5 objReportTable.Location = objConn.DatabaseName & ".." &
objReportTable.Name
6 Next

on line 5. All the articles/newsgroup postings etc have yet to be of any
help. The Crystal site has an article on the problem but refers to using a
ODBC file DSN, but I'm using the OLEDB driver in the reports and not ODBC.
If I run the report in the Crystal windows viewer it is fine - only the web
viewer doesn't want to play nice.

Any help is appreciated.

Cameron
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
cj
Thanks Ravi,
But I already tried your suggestion and no dice. The user and password are
the same for both Crystal and my application, and I even tried the 'sa' user
and still get the same problem.

I know it's nothing to do with the web viewer itself, because I can't even
run the report let alone display it in the viewer.

Cheers,

Cameron

"Ravi sankar" <ra*****@lycos.com> wrote in message
news:06****************************@phx.gbl...
I suppose the owner of the table is "dbo" and the user u r
trying at runtime is not a dbo.
R u using the same sql id and password when u execute from
crystal and the web application?
Try replacing
objReportTable.Location = objConn.DatabaseName & ".." &
objReportTable.Name

with

objReportTable.Location = objConn.DatabaseName & ".dbo." &
objReportTable.Name
thanks and regards,
s.ravi sankar
-----Original Message-----
Has anyone come across the following error in running a

Crystal Report in
ASP.NET using the Crystal Reports Web Viewer control...

CrystalDecisions.CrystalReports.Engine.InvalidArg umentExce

ption: Error in
File c:\..\..\..\..\InvoiceReport.rpt: Invalid table

number.

It happens when trying to set the location for each table

in the report

1 For Each objReportTable In rptInvoice.Database.Tables
2 Dim objTableLogOnInfo As TableLogOnInfo =

objReportTable.LogOnInfo
3 objTableLogOnInfo.ConnectionInfo = objConn
4 objReportTable.ApplyLogOnInfo(objTableLogOnInfo)
5 objReportTable.Location = objConn.DatabaseName

& ".." &
objReportTable.Name
6 Next

on line 5. All the articles/newsgroup postings etc have

yet to be of any
help. The Crystal site has an article on the problem but

refers to using a
ODBC file DSN, but I'm using the OLEDB driver in the

reports and not ODBC.
If I run the report in the Crystal windows viewer it is

fine - only the web
viewer doesn't want to play nice.

Any help is appreciated.

Cameron
.

Jul 19 '05 #2

P: 1
I got the same error and after some work found out that it was caused because I was using integrated security when creting the report and while running the report from code I was using sql login. Using Sql Login when creating the report solved the issue. Also the error can occur if your saving the report with Crystal report with crystal reports full version instead of crystal reports .Net included with Visual Studio and the version do not match. Try saving with Crystal in VS.

Hope this helps.

Regards,
Huzaifa
Feb 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.