Crystal Reports - subreport - print to file problem
Posted on 2001-08-06
I have lot of reports designed with Crystal reports with sub reports in them. Now, using Crystal OCX control from VB, when I set a formula for the subreport and try to print to file, I get an error no. 20997 with lots of '?' in the error message, and some other characters in it (like '???t??????????? ?'). But it prints to Window fine. Only to print to file, I get problem.
The vb code is like this:
CrystalReport1.ReportFileName = "PsStk001.rpt"
CrystalReport1.SubReportToChange = "PsStkSel.rpt"
CrystalReport1.Formulas(1) = "vbCaption1 = 'Department'"
CrystalReport1.Formulas(2) = "vbField1 = 'D1'"
CrystalReport1.SubReportToChange = ""
CrystalReport1.Destination = crptToFile
CrystalReport1.PrintFileType = crptCrystal
CrystalReport1.PrintFileName = "C:\a.rpt"
CrystalReport1.Action = 1
This happens, to almost all reports with subreports. Any ideas please, we need to set right all those reports, that give this problem.