Runtime error :20525 unable to load the report

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2007
Posts: 76
Reputation: anto_nee is an unknown quantity at this point 
Solved Threads: 4
anto_nee anto_nee is offline Offline
Junior Poster in Training

Runtime error :20525 unable to load the report

 
0
  #1
Aug 24th, 2007
any problem here with the code coz am getting the error as unable to load the report

error no:20525

and it shows the property read only

can u clear it plzzzz

CrystalReport1.ReportFileName = App.Path + "\REPORTS\Nature_Of_Complaint.rpt"
CrystalReport1.ParameterFields(0) = "natureofcomplaint;" & cmbReport.Text & ";true"
CrystalReport1.ParameterFields(1) = "fromdate;" & dtpFrom.Value & ";true"
CrystalReport1.ParameterFields(2) = "todate;" & dtpTo.Value & ";true"
CrystalReport1.Action = 1
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Runtime error :20525 unable to load the report

 
0
  #2
Aug 24th, 2007
Hi,

What is the back end DB...? If SQLServer/Oracle, then u have to pass connection string...

REgards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Runtime error :20525 unable to load the report

 
0
  #3
Aug 24th, 2007
try crystalreport1.sqlquery instead of CrystalReport1.ParameterFields,
it can query the report in one line just like an ordinary sql statement in vb.
hope this helps.......
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 76
Reputation: anto_nee is an unknown quantity at this point 
Solved Threads: 4
anto_nee anto_nee is offline Offline
Junior Poster in Training

Re: Runtime error :20525 unable to load the report

 
0
  #4
Aug 26th, 2007
no guys

i think this is cause by the version

when i connect cr7 its working

but with cr9 i cant connect

but i have to check the connection string

am using sql server

can u write a connection string for me
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Runtime error :20525 unable to load the report

 
0
  #5
Aug 27th, 2007
Hi,

Working with CR9 is quite different, It is and RDC compared to lower versions which are "OCX". u need to use CR Viewer, Place the CR Viewer on the Form and use this code:

  1. Dim m_Report As CRAXDDRT.Report
  2. Dim m_Application As New CRAXDDRT.Application
  3. Set m_Report = Nothing
  4. Set m_Report = m_Application.OpenReport(App.Path & "\MyRep.rpt", 1)
  5. With CRViewer1
  6. .EnableExportButton = True
  7. .EnablePrintButton = True
  8. .EnableCloseButton = True
  9. .ReportSource = m_Report
  10. .Height = Me.ScaleHeight - 1000
  11. .Width = Me.ScaleWidth
  12. .Left=200
  13. .Top =200
  14. .ViewReport
  15. End With

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 76
Reputation: anto_nee is an unknown quantity at this point 
Solved Threads: 4
anto_nee anto_nee is offline Offline
Junior Poster in Training

Re: Runtime error :20525 unable to load the report

 
0
  #6
Aug 27th, 2007
thank you very much veena its workng fine

and i have one prob with passing the parameters

hw can i? codes........

and another one thing

why we cant open the report in a seperate window. do u hav any code for that
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 76
Reputation: anto_nee is an unknown quantity at this point 
Solved Threads: 4
anto_nee anto_nee is offline Offline
Junior Poster in Training

Re: Runtime error :20525 unable to load the report

 
0
  #7
Aug 27th, 2007
i was totally confused

hw can i write the connection string

hw to pass the parameter
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: Runtime error :20525 unable to load the report

 
0
  #8
Aug 27th, 2007
Hi,

You cannot show it as a Seperate Window as our prev Versions, Instead U can add one More Form and a Viewer, and Call to show that form here, It would Look like a Seperate Window..

To pass Parameter:

  1. m_Report.ParameterFields.Item(1).AddCurrentValue "MyParameter"

To Change Connection :
  1. dim dCon As CRAXDRT.ConnectionProperties
  2. Set dCon =m_Report.Database.Tables.Item(1).ConnectionProperties
  3. dCon("DSN") ="MyDSNName"
  4. dCon("Database") ="MyDBName"
  5. dCon("User OD") ="MyUserID"
  6. dCon("Password") ="MyPassword"

Pass these before viewing the report..

REgards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 76
Reputation: anto_nee is an unknown quantity at this point 
Solved Threads: 4
anto_nee anto_nee is offline Offline
Junior Poster in Training

Re: Runtime error :20525 unable to load the report

 
0
  #9
Aug 27th, 2007
thank u

solved

fine working

veenaaaaaaa

i wont forgot u

thanks

regards
anto
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 5467 | Replies: 8
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC