PatMcLaughlin
Programmer
We have a crystal report form that is printed from time to time and called from VFP. When it was created, it used an XML created (Call it 'ABC.xml'). Now they want to change the name of the xml on each form printed... (Call it ABC123.xml) The actual xml has not changed, just the name. In VB.Net, we do this all the time with a FormName.SetDataSource(ABC123). I have had no luck doing the same thing in VFP. Any suggestions? The following code works as long as we use 'ABC.xml' but nothing in it passes the new xml to Crystal when we change the name:
Code:
loCrystal=CreateObject("CrystalRuntime.Application")
loReport=loCrystal.OpenReport(gcCrystalFiles + lcReport + ".rpt",1)
loReport.PaperOrientation = 2
loReport.DisplayProgressDialog = .F.
loReport.ReportTitle = (tcReportName)
loReport.PaperSize = lnTray
IF lnDuplex1 > 1 Then
loReport.PrinterDuplex = lnDuplex1
ENDIF
loReport.PrintOut(.F., INT((tnCopies)))