I have this code in my VFP command button on a form. I am using the Crystal ActiveX Control on my VFP form.
IF THISFORM.cborpt.Value = "100"
THISFORM.olecontrol1.ReportFileName = "c:\omdrpts\motopshock.rpt"
testout = THISFORM.olecontrol1.PrintReport
ENDIF
The report appears in a preview window as it should, but that only happens when I have the report in Crystal with the Save Data with Report checked on and it doesn't have to ask me for parameter values.
When I run the report with Save Data with Report not turned on and it has to ask me for parameter values after the Crystal Report starts to run...
it allows me to enter the Parameter values inside the Crystal Report and the report runs, but then the preview window appears and then quickly disappears.
So it seems that if I don't have to enter parameter values to run the Crystal Report from VFP, everything works properly, but if I do have to enter parameter values, it is no good. I will looking into the problem because I have several Crystal reference manuals handy.
I will also be changing my VFP form to pass the parameters to the Crystal Report from the VPF form so I don't have to enter them in Crystal. However, it is really better if I can enter parameter values in Crystal and not in VFP because then I can run the report as a stand-alone Crystal Report or in conjunction with VFP as long as VFP starts the report running and previews it correctly.
Does anyone know how to fix this problem? Or have a better idea? What's better, enter parameter values in VFP or leave them in Crystal? Thanks for the help.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site:
www.stephenkramer.comWould you believe Far Side Lite?
More than 270 original cartoons.