943,985 Members | Top Members by Rank

Ad:
Aug 24th, 2007
0

Runtime error :20525 unable to load the report

Expand Post »
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
Similar Threads
Reputation Points: 12
Solved Threads: 4
Junior Poster in Training
anto_nee is offline Offline
76 posts
since Aug 2007
Aug 24th, 2007
0

Re: Runtime error :20525 unable to load the report

Hi,

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

REgards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 24th, 2007
0

Re: Runtime error :20525 unable to load the report

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.......
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Aug 26th, 2007
0

Re: Runtime error :20525 unable to load the report

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
Reputation Points: 12
Solved Threads: 4
Junior Poster in Training
anto_nee is offline Offline
76 posts
since Aug 2007
Aug 27th, 2007
0

Re: Runtime error :20525 unable to load the report

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:

vb Syntax (Toggle Plain Text)
  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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 27th, 2007
0

Re: Runtime error :20525 unable to load the report

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
Reputation Points: 12
Solved Threads: 4
Junior Poster in Training
anto_nee is offline Offline
76 posts
since Aug 2007
Aug 27th, 2007
0

Re: Runtime error :20525 unable to load the report

i was totally confused

hw can i write the connection string

hw to pass the parameter
Reputation Points: 12
Solved Threads: 4
Junior Poster in Training
anto_nee is offline Offline
76 posts
since Aug 2007
Aug 27th, 2007
0

Re: Runtime error :20525 unable to load the report

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:

vb Syntax (Toggle Plain Text)
  1. m_Report.ParameterFields.Item(1).AddCurrentValue "MyParameter"

To Change Connection :
vb Syntax (Toggle Plain Text)
  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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 27th, 2007
0

Re: Runtime error :20525 unable to load the report

thank u

solved

fine working

veenaaaaaaa

i wont forgot u

thanks

regards
anto
Reputation Points: 12
Solved Threads: 4
Junior Poster in Training
anto_nee is offline Offline
76 posts
since Aug 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: RichTextBox, I need help
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: tours and travels in vb help required





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC