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
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