p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: VB Crystal Report - method action failed


Message #1 by philip@t... on Sat, 8 Jun 2002 15:53:23
Hi everybody,

I have been scanning archives and lists for hours n i still cant get my 
answer.
It used to work, but after formatting my machine, i am having this problem:
 
Method 'Action' of Object 'CrystalCtrl' failed 
on the line where i try to set 
report1.action=1

the code is:
    Report1.ReportFileName = App.Path & "\doctorsdetails.rpt"
    Report1.DataFiles(0) = DBName
    Report1.DiscardSavedData = True
    Report1.Action = 1

Any help will be appreciated!

Phil
Message #2 by "Wong Tze Lun" <tzelun0502@l...> on Sat, 08 Jun 2002 23:33:40 +0700
Hi Phil,
 i think your crystal report OCX is not installing corrrectly try re-install the crystal report

regards
tl wong




_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
Message #3 by philip@t... on Sun, 9 Jun 2002 07:25:05
Thanx Wong,

I'll try it right away. but just to give u some more info, i installed 
crystal reports (7) on win 98 (another partition) and it works fine. its 
giving probs in win2k. besides i have vs.NET loaded on the same win2k 
machine, cant that be a problem.
anyway ill try to reinstall it in win2k and let u know righto!

Thanx a lot. will get back to the forum..

Phil
Message #4 by philip@t... on Sun, 9 Jun 2002 07:54:34
Hi Wong,

No its not working. I re-installed crystal reports. still giving the same 
problem. i am dumbfounded.

should i uninstall my .net beta1?

thanx,
Phil
Message #5 by "Wong Tze Lun" <tzelun0502@l...> on Sun, 09 Jun 2002 22:20:46 +0700
hi phil ,
 i don't think so is the .net problem what is the error message again when u open the crystal report 

regards
tl wong



_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
Message #6 by philip@t... on Tue, 11 Jun 2002 07:49:23
hello Wong,

Crystal reports by itself (without vb) runs fine. I can create reports, print etc. 
but when run thru vb with code, it gives this error:

Method 'Action' of Object 'CrystalCtrl' failed 
on the line where i try to set 
Report1.action = 1

its working fine in windows 98. but in windows 2000 Advance Server (Service pack 1) 
its giving me problems.

btw, r u chinese??

Regards,
Phil
Message #7 by "Wong Tze Lun" <tzelun0502@l...> on Wed, 12 Jun 2002 23:51:24 +0700
Hi Philip,
  What command u send to vb when u call the report that time do you have any formula in the report ? and do call the crystal to send
to printer or windows  or does your windowws 2000 advanced server have the crystal report component install correctly. i think if
your vb coded run fine in 98 but not in 2000 then the most likely is the crystal component.

 yup i am malaysian chinese

regards
tl wong



_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
Message #8 by philip@t... on Wed, 12 Jun 2002 19:18:02
Hi Wong,

Nopes i dont have any formulas in the report. Its a plain n simple report.

As i had posted earlier, the error is : [Method 'Action' of Object 'CrystalCtrl' 
failed ]
on the line where i try to set 
report1.action=1

the vb code is:
    Report1.ReportFileName = App.Path & "\doctorsdetails.rpt"
    Report1.DataFiles(0) = DBName
    Report1.DiscardSavedData = True
    Report1.Action = 1

I think its a win2k problem. but i cant solve it.
i am simply trying to preview the report (for printing to printer), not even sending 
it directly to the printer/other output devices. besides, the printer is configured 
correctly coz i can print from other applications.

i too think crystal components are not installed correctly, but even after i 
reinstalled it still gives the same prob. i just thought that since .NET had crystal 
reporting built in, it may be giving version conflicts.... just maybe, but i dont 
have the heart to uninstall my .NET coz it took me ages to install!

Thanx n Regards,
Phil
Message #9 by "Wong Tze Lun" <tzelun0502@l...> on Fri, 14 Jun 2002 16:44:22 +0700
Hi Philip,
 since your are using the Crystal component try find this compoenent CRYSTL32.ocx in your pc and manualy register this component
used the regsvr32 [full path of where the componenent is located]. I htink it should be work after u have register this component

regards
tl wong


_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
Message #10 by philip@t... on Sat, 15 Jun 2002 07:41:41
Hi Wong,

I found crystl32.ocx in my winnt\system32 directory. got it successfully 
installed manually. but the same error still comes.

I am feeling so frustrated. ha ha.

Thanx n regards,
Phil
Message #11 by "Wong Tze Lun" <tzelun0502@l...> on Sun, 16 Jun 2002 01:39:33 +0700
Hi Philips
  as you said it only happen in your client Pc ? ok try this way install VB in your clint Pc and run the vb program n the report
also see if is it still the same problem and make sure u only have one crystal componenet in the PC where it sometimes the exe will
try to look for different date component 

regards
tl wong


_______________________________________________________
WIN a first class trip to Hawaii.  Live like the King of Rock and Roll
on the big Island. Enter Now!
http://r.lycos.com/r/sagel_mail/http://www.elvis.lycos.com/sweepstakes
Message #12 by philip@t... on Sun, 16 Jun 2002 07:58:23
Hi Wong,

No it dosent happen in my client PC. i said it happens in windows 2000 not 
windows 98.

ok, i will install CR in another win2k machine and find out.

Thanx,
Phil
Message #13 by philip@t... on Sat, 22 Jun 2002 15:07:07
Hi Wong,

Just wanted u to know that when i installed in another win2k professional 
machine it worked perfectly!

dunno whats the prob.

Regards,
Phil
Message #14 by "Wong Tze Lun" <tzelun0502@l...> on Sun, 23 Jun 2002 02:05:40 +0700
 Hi Philip 
  one final thing you can do is reomove all the dll or ocx which is related to the crystal report don't left any of them. and after
u have remove it try to install it again 

regards
tl wong



_________________________________________
Communicate with others using Lycos Mail for FREE!
http://mail.lycos.com/

  Return to Index