RPrinceton
Programmer
Hi All,
At run time I am trying to change the file from which a subreport gets it data. I believe the code snippet below is correct, however at run time the subreport presents old data i.e., the data from the path I used at design time. I have ensured that the report does not save data both in the main report and subreport. I have also ensured that the path is correct. What subtly am I missing? Please advise. Thx in advance.
Regards,
RPrinceton
Code snippet:
CrystalReport1.ReportFileName = d:\VB\NFLPredictions\CrystalReports\Predictions.Rpt
CrystalReport1.SubreportToChange = "Epilog.rpt" <-- subreport
CrystalReport1.DataFiles(0) = "D:\VB\NFLPredictions\AltInputs\Epilog\RptInp.txt" <--new data
CrystalReport1.SubreportToChange = ""
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1
At run time I am trying to change the file from which a subreport gets it data. I believe the code snippet below is correct, however at run time the subreport presents old data i.e., the data from the path I used at design time. I have ensured that the report does not save data both in the main report and subreport. I have also ensured that the path is correct. What subtly am I missing? Please advise. Thx in advance.
Regards,
RPrinceton
Code snippet:
CrystalReport1.ReportFileName = d:\VB\NFLPredictions\CrystalReports\Predictions.Rpt
CrystalReport1.SubreportToChange = "Epilog.rpt" <-- subreport
CrystalReport1.DataFiles(0) = "D:\VB\NFLPredictions\AltInputs\Epilog\RptInp.txt" <--new data
CrystalReport1.SubreportToChange = ""
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1