Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subreport parameters
Message
From
05/05/2005 11:53:00
 
 
To
05/05/2005 11:26:22
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:
01011342
Views:
27
Is the subreport linked or unlinked?

>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"
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform