472,356 Members | 487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,356 software developers and data experts.

Invalid Table Name in Crystal .NET

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
2 9908
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
1
by: cj | last post by:
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.InvalidArgumentException:...
0
by: Marvin Massih | last post by:
Hello, I want to print a Crystal report from a web-service or ASP .NET application. I have Crystal Reports 8.0 and Visual Studio .NET 2003 Enterprise Architect (including Crystal Reports for...
1
by: Harshil | last post by:
Hi All, I am working on Vb.net application with oracle as my database. I have developed reports using crystal report 9. Usually when you open reports directly in crystal report viewer control it...
3
by: Amar | last post by:
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual foxpro environment and it creates a table X.dbf in the same folder where this program file is and populates some data...
0
by: Ray | last post by:
Hi, I have deployed a program with crystal report called in three client's PC. Two of the clients can preview the report successfully. However, the remaining clients has error occured while...
3
by: David C. Barber | last post by:
Using SQL Server 2000 and moving to a new computer. We did a full backup of the existing database to tape, brought up the new computer with a clean install using the same server name and IP...
1
by: swatii | last post by:
Hi, I am new to .NET.I have created a desktop application in C#.NET that has Crystal reports used in it. This all works fine when I log in on the "EVERY" as servername which is the default name...
4
by: mattehz | last post by:
Hey there, I am trying to upload old source files and came across these errors: Warning: Invalid argument supplied for foreach() in /home/mattehz/public_html/acssr/trunk/inc_html.php on line 59...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.