Solved

Able to run my report

Posted on 2001-06-27
35
759 Views
Last Modified: 2008-03-10
I have created some reports using Crystal Reports 8.
After i have changed my PC, and tried to run my reports again, i couldn't. It is the same version of Crystal Report which i'm using in my new PC.

I tried a very simple code:

Private Sub Command1_Click()
        Module1.connnectdb
        CrystalReport1.ReportFileName = "C:\temp\report1.rpt"
       
        CrystalReport1.SQLQuery = "select * from Table"
       
        CrystalReport1.Connect = rdconn
        CrystalReport1.Destination = crptToWindow
        CrystalReport1.WindowState = crptMaximized
        CrystalReport1.Action = 1
End Sub

the code will fail in my Action method.
my error msg is:
Run-time error '-2147417848 (80010108)'
Method 'Action' of object 'CrystalCtrl' failed

i have search the help file, it says that my database is not verified. but i have tried, it is verified and pointing to the correct database.

pls help.


0
Comment
Question by:edonasan
  • 20
  • 15
35 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
"I have changed my pc" - does this mean you have a new PC and have restored a backup to the new PC, or does it mean that you are using someone else's computer?

What is the error number and message being returned by the CrystalReport1 object (not the VB error)?

Can you access this table and db using a simple ADO recordset object?
0
 

Author Comment

by:edonasan
Comment Utility
"i have changed my PC" - meaning i have a new machine now and restored the backup to the new PC.

this(VB error) is the only error number and message that i have. how do i generate the CrystalReport1 error from my VB program?

what is the another method on the ADO recordset object which u recommended? maybe i can try it out.

Thanks alot.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
When you restored, did you reinstall Crystal Reports or try to run it from the restored copy?  You may have some DLLs which did not get registered.  Try reinstalling Crystal.

To catch the crystal error, try this type of thing

CrystalReport.PrintReport
If CrystalReport.LastErrorNumber <> 0 Then
  MsgBox "Crystal Reports Error Number " & CrystalReport.LastErrorNumber & vbCrLf & CrystalReport.LastErrorString, vbExclamation + vbOKOnly, "Crystal Reports Error"
End If

Try these two things to begin with:  Reinstall CRW, Add error catch.  I think reinstalling CRW will fix your problem.
0
 

Author Comment

by:edonasan
Comment Utility
i have tried re-installing Crystal Report.

I have got the same error.

Then, i tried to trap the crystal error,

Crystal last error number: 20520
Crystal last error string: Job already started

how can i resolve this?
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
That error message indicates that you have a report running at the point in time where you try to start another.  Is the code you provided the complete set of code you are running?

Try replacing the line
  CrystalReport1.Action = 1
with
  CrystalReport1.PrintReport

which is not supposed to generate the run-time error.
0
 

Author Comment

by:edonasan
Comment Utility
i am sure that there is no report running at the same time. yes, this is the complete set. It was working alright in my previous PC.

i have tried "CrystalReport1.PrintReport", it didn't work.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Let's see if we can isolate the problem to the CR Engine or the report.  Rename your existing report and create a simple report based on the same data set having the same name as the old report.  Do not include more that one or two fields on the new report.  Perhaps your report file is corrupt.  If the new, simple report doesn't run either, then the problem may be with the installation of the MDAC.
0
 

Author Comment

by:edonasan
Comment Utility
this example i gave is from the "new, simple" testing report which i tried creating to test out. it hit the same problem at the Action method.

so, if it's the problem with the installation of MDAC, how shd i fix it?

0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
MDAC is from Microsoft and can be downloaded from http://www.microsoft.com/data.

Before you do that, what is the database you are using?  Could you post the module1.connectdb code you are using?

0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Are you using TTX files for your report?  Have you performed a Verify Database in Crystal Reports?
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
What is the scope of the variable rdConn?  Is it declared as public in one of your modules, or is it private?
0
 

Author Comment

by:edonasan
Comment Utility
I'm using a SQL Server 2000 database.

I have perform "Verify Database" in my Crystal Reports. It returns me "Database is up-to-date"

this is my module1:

Public rdconn As Connection

Public Static Sub connnectdb()
'Dim dbs As Database

 Set rdconn = New ADODB.Connection
 With rdconn
   .Provider = "SQLOLEDB"
   .ConnectionString = "SERVER=(local);" & _
                       "initial catalog=Test;" & _
                       "User ID =sa"
   .Open
   .CursorLocation = adUseClient
  End With
End Sub
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Did you design your report using a TTX (Data Definition File)?  If so, check that Database->Verify on every print is NOT checked.

0
 

Author Comment

by:edonasan
Comment Utility
verified, the function is not checked.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
So your report is based on a data definition (TTX) file?
0
 

Author Comment

by:edonasan
Comment Utility
I don't think so.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Dumb question, but do you know for sure that your database is working?  Can you preview these reports in the CRW designer?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:edonasan
Comment Utility
yes, my DB is working alright. i can preview at my CRW designer.

I think the problem is with my VB. something is missing somewhere which caused the link to the report failed.

i have read alot of articles on MSDN and Crystal Report help. But none of them helps.

sigh...
0
 

Author Comment

by:edonasan
Comment Utility
when i used CrystalReport1.PrintReport then error msg becomes:

Run-time error '-2147417848 (80010108)'
Method 'PrintReport' of object 'CrystalCtrl' failed

it seems that it's the crystal report control is failing VB.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Going all the way back to the beginning of this thread, did you ever reinstall VB and the service packs after you restored?  Did you install CRW before or after reinstalling VB?
0
 

Author Comment

by:edonasan
Comment Utility
1st time, i think i installed CRW 1st.
then, my VB.

after i cannot run my report, i re-install my CRW (as it involves licensing, i did a reinstall, did not remove totally and install again)

then i thought it might be VB problem, i re-install my VB again (using the REPAIR function)

again, nothing helps.

today, removed my VB totally and install again (with SP5).
then, i re-install my CRW again. (3rd time...)

i'm getting quite tired of this already :(



0
 

Author Comment

by:edonasan
Comment Utility
i have called up Seagate Crystal Report support.
They confirmed that there is no particular sequence whether u shd installed either one first.

i'm going to try my last attempt to un-install CRW and install again.
0
 

Author Comment

by:edonasan
Comment Utility
re-installing of CRW does not help at all.

i think the probelm is not with CRW.

i did a testing by creating a report without any connection to my SQL database, which is a pure text report. it works perfectly alright with the statement "CrystalReport1.Action = 1", showing my report view.

so, i went to check my ado/odbc connection everywhere, it is working alright.

but it just won't work when it's connecting to my SQL.


0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Are you running NT or W2K?  If so, can you connect while logged in as an administrator?
0
 

Author Comment

by:edonasan
Comment Utility
i'm running on W2K. i have tried logging in as administrator. still did not work.

suspect the DLL problem, still checking.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
There is a tech note at Crystal Decisions that applies to permissions on ODBC connections being trashed by CR8 installation.  I'll try to find it.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Any luck yet?  Here is a list of the DLLS with sizes and dates in my c:\windows\crystal directory.

P2BBDE   DLL       141,312  12-07-99  7:31a p2bbde.dll
P2BXBSE  DLL       212,992  12-07-99  7:31a p2bxbse.dll
P2SFS    DLL        77,824  01-06-00  7:15a p2sfs.dll
P2SOUTLK DLL       753,664  12-15-99  7:17a p2soutlk.dll
U2DAPP   DLL        28,672  12-07-99  7:31a u2dapp.dll
U2DDISK  DLL        28,672  12-07-99  7:31a u2ddisk.dll
U2DMAPI  DLL        40,960  12-07-99  7:31a u2dmapi.dll
U2DNOTES DLL        53,248  01-12-00  7:18a u2dnotes.dll
U2DPOST  DLL        49,152  12-07-99  7:31a u2dpost.dll
U2DVIM   DLL        57,344  12-07-99  7:31a u2dvim.dll
U2FCR    DLL        28,672  12-07-99  7:31a u2fcr.dll
U2FDIF   DLL        36,864  12-07-99  7:31a u2fdif.dll
U2FHTML  DLL        32,768  01-06-00  7:15a u2fhtml.dll
U2FODBC  DLL        49,152  12-07-99  7:31a u2fodbc.dll
U2FRDEF  DLL        65,536  12-07-99  7:31a u2frdef.dll
U2FREC   DLL        36,864  12-07-99  7:31a u2frec.dll
U2FRTF   DLL       122,880  01-26-00  7:39a u2frtf.dll
U2FSEPV  DLL        36,864  12-07-99  7:31a u2fsepv.dll
U2FTEXT  DLL        81,920  12-07-99  7:31a u2ftext.dll
U2FWKS   DLL        40,960  12-07-99  7:31a u2fwks.dll
U2FWORDW DLL       106,496  12-07-99  7:31a u2fwordw.dll
U2FXLS   DLL       208,896  01-26-00  7:39a u2fxls.dll
CRXLAT32 DLL        24,576  12-07-99  7:31a Crxlat32.dll
P2SSQL   DLL       163,904  01-06-00  7:15a p2ssql.dll
P2LSQL   DLL        94,208  10-27-99  8:55a P2lsql.dll
P2BBTRV  DLL        77,824  12-07-99  7:31a p2bbtrv.dll
P2CTBTRV DLL        53,248  01-28-00 12:49p p2ctbtrv.dll
P2IXBSE  DLL       229,376  11-17-99  4:47p p2ixbse.dll
P2LODBC  DLL       122,880  09-29-99 10:14a p2lodbc.dll
P2MOLAP  DLL       270,336  01-07-00  8:15a p2molap.dll
P2SOLAP  DLL       258,048  01-07-00  8:15a p2solap.dll
P2SMSIIS DLL       164,864  12-10-99  7:17a p2smsiis.dll
P2SWBLG  DLL       137,728  12-10-99  7:17a p2swblg.dll
P2SOLEDB DLL       196,608  01-06-00  7:15a p2soledb.dll
U252000  DLL        24,576  12-07-99  7:31a u252000.dll
U25DTS   DLL        24,576  12-07-99  7:31a u25dts.dll
U2L2000  DLL        24,576  12-07-99  7:31a u2l2000.dll
U2LCOM   DLL        45,056  12-07-99  7:31a u2lcom.dll
U2LDTS   DLL        24,576  12-07-99  7:31a u2ldts.dll
U2LEXCH  DLL        28,672  12-07-99  7:31a u2lexch.dll
U2LFINRA DLL        49,152  12-07-99  7:31a u2lfinra.dll
U2LSAMP1 DLL        24,576  12-07-99  7:31a u2lsamp1.dll
U2L_FSC  DLL        73,728  12-20-00 12:37a U2l_fsc.dll
0
 

Author Comment

by:edonasan
Comment Utility
Hi,

checked the article u helped me to find, followed the instructions stated, but still the same.

checked most of the DLLs in ur list, they are similar.
still having the same problem.
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
Edonasan

I suggest that you try to pinpoint the problem by creating a simple report that you can call from VB.  Do not base it off your SQL server.  Use an Access file (some example files come with CRW if you don't have Access).  If you can call the report, preview it and print it then I think we can rule out both Visual Basic and the Crystal Engine.

Assuming that works, then I suggest an ODBC version of a report accessing your SQL server instead of the native drivers.  If that works, then the problem has been pinpointed to the native SQL drivers that CRW uses.

If it doesn't work (the access report), then your problem lies in the integration of VB and CRW and is not initially a SQL server problem.

You might also try both the CRAXDRT and CRPEAUTO library methods of calling a report from VB.  Perhaps one of them is not installed properly.

Finally, please verify that you have either the Professional or Enterprise version of CRW installed by checking Help->About in Crystal.  Perhaps you have used the wrong activation code (a long shot, but you never know).

I will be gone for 10 days starting later today.  Don't think I'm ignoring your comments, but I am not taking a PC on vacation.

Best of luck
0
 

Author Comment

by:edonasan
Comment Utility
Hi DRRYAN3!

my problem is solved.

the reason being is that I have installed the new Visual Studio .NET in my PC previously. although i have removed thoroughly and installed back my old Visual Studio 6, the DLLs remained the later version by VS.NET, which the newer version does not support crystal report, as it is extremely BETA. the main DLL which is causing my problem is CRPE32.DLL. after replacing it with the earlier version, my report is working alright.

thanks to the help of the Crystal Report Support Team.

Also, i like to thank you, DRRYAN3, too...for all the advice u have gave me throughout the debugging phase.

Hope u enjoy your vacation!
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
edonasan

Glad you got your problem fixed.  You never mentioned installing VS.NET, but that happens.

If you want to close this question without awarding points, leave a note in community support asking them to PAQ this question, otherwise, you can accept any of my comments as an answer.

PS - I did enjoy my vacation ... never saw a PC!

DRRYAN3
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
edonasan

Have you abandoned this question?
0
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
edonasan

Please resolve this open question.  I spent a lot of time trying to help you through your problem - At the least you could close it by accepting an answer or asking CS to PAQ the question or reduce the points.

DRRYAN3
0
 
LVL 12

Accepted Solution

by:
DRRYAN3 earned 300 total points
Comment Utility
DRRYAN3
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now