Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Err 20525 while running Crystal report

Status
Not open for further replies.

nirajj

Programmer
Mar 12, 2003
103
US
Hi all:

I just made some changes to the existing crystal reports (which might have been created in ver 5 or so) and saved it in ver 10.

Now when I run the same VB code I am getting error 20525: Unable to load report.

I am sure its because the report was saved in ver 10 and I need to do some changes in the VB code probably. But I am not sure what is it. To be honest I am not too eficient with VB & Crystal reports. Any help will be appreciated.

Thank you.
 
It's hard for people to help you when your post is so vague. Do you have code that you can paste up here?
 
Sorry for the vague posting.

Basically following is the code associated with the problem:

CR is the Crystal Report Control 4.6

CR.SelectionFormula = " {Table1.dt} >= date(2004,03,01) and {Table1.dt} <= date(2004,03,08) "

CR.Formulas(0) = " Reptitle= ' Report Title' "

CR.Action = 1 <-- This is where I am getting error


I think since the CR is 4.6 control and the report I saved is in CR 10 ver, it should be creating problem. Any ideas how to solve the problem with the existing control ?


 
Upgrade to CR10 or redesign the report in CR4. You would be very lucky to get forward compatibility over so many versions

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
There have been many changes in versions from 4.6 through 10

1. Create object variables like:
Dim CrxApp As New CRAXDRT.Application
Dim CrxRpt As CRAXDRT.Report

2. Establish connection:
CrxRpt.Database.Tables(1).SetLogOnInfo "server_name", databasename , "usename", "password"

3. Assign Report File Name:
Set CrxRpt = CrxApp.OpenReport("ReportName.Rpt")

4. it's better to handle SQL statement instead of SelectionFormula property:
CrxRpt.SQLQueryString = CrxRpt.SQLQueryString & " WHERE Fieldname > "X"

5. There is a Component Control to preview reports:
CRViewer1.ReportSource = CrxRpt
CRViewer1.ViewReport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top