Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subreport parameters
Message
From
05/05/2005 11:26:22
 
 
To
31/03/2005 11:06:16
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000333
Message ID:
01011324
Views:
22
Craig,
I'm stillhaving a problem with my code to run a report with parameters and includes a subreport with parameters.

The following is my code.

ocr = createobjec("CrystalRuntime.application")
orpt = ocr.openreport("f:\apps\in-house apps\eomaccounting\REPORTS\Other Reports\Loan Sale Trust Posting.rpt")
if orpt.hassaveddata
orpt.discardsaveddata()
endif
ocparm=orpt.ParameterFields()
oparm=ocparm.Item(1)
oparm.SetCurrentValue(loan_sell_date)
oparm=ocparm.Item(2)
oparm.SetCurrentValue(wkinv_cd)
oSubRpt = oRpt.OpenSubReport("F:\Apps\In-House Apps\eomaccounting\REPORTS\Other Reports\trstsalesum.rpt") (problem line)
IF oSubRpt.HasSavedData
oSubRpt.DiscardSavedData()
ENDIF
oSubCParm = oSubRpt.ParameterFields()
oSubParm = oSubCParm.Item(1)
oSubParm.SetCurrentValue(loan_sell_date)
oSubParm = oSubCParm.Item(2)
oSubParm.SetCurrentValue(wkinv_cd)
orpt.printout()
I am getting this error on the above designated code line.
"Invalid Subreport Name"

This subreport is located in the report footer of the main report and is located at the path stated above. In the main report is refers to the subreport as "trstsalesum"
God Bless America
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform