PDA

Click to See Complete Forum and Search --> : Passing parameter values in VB6 using CR9


suri_nar
Jul 13th, 2008, 06:11 AM
Hi all,

I am VB6 as front end. I was earlier using CR8 and was able to effortlessly connect my Crystal Report using parameters as per code below.
I used to put a CR ocx file in the form and define the Crystal Report name. This was so simple.

I have now migrated to CR9. I want to know the code to be used for opening the report created earlier in CR8 which now works with CR9; but is not opening in the VB Application.

Thanks,

Surya


The Code I used with CR8 was as under:

With CrystalReport1

.ReportFileName = "c:\pet-bill.rpt"
.ParameterFields(0) = "STDT;" & "DATE(" & Format(CDate(sJoin), "YYYY") & "," & Format(CDate(sJoin), "MM") & "," & Format(CDate(sJoin), "DD") & ")" & ";true"
.ParameterFields(1) = "endt;" & "DATE(" & Format(CDate(sJoin1), "YYYY") & "," & Format(CDate(sJoin1), "MM") & "," & Format(CDate(sJoin1), "DD") & ")" & ";true"
.RetrieveDataFiles
.Action = 1
End With

jggtz
Jul 14th, 2008, 11:15 PM
AFAIK the .OCX is not supported by Crystal Reports 9
You should use RDC

suri_nar
Jul 14th, 2008, 11:25 PM
Can you please guide me to use RDC step wise please?
Regards,
Surya

jggtz
Jul 15th, 2008, 11:29 PM
I hope that you find the solution in the attachment