ashishjain
Programmer
hi,
I am developing application in Visual Basic/MS Access/Crystal Report. I am setting database path dynamically for a crystal report dyanmically. e.g.
CrystalReport1.ReportFileName = "acc.rpt"
CrystalReport1.DataFiles(0)= App.path&"\Account.mdb"
CrystalReport1.SelectionFormula = "issue.status='O'"
Its working fine when there is no sub report but when i used subreport in a report. It doesn't set path for subreport dyanmically. I have written code like this way:
CrystalReport1.ReportFileName = "acc.rpt"
CrystalReport1.DataFiles(0)= App.path&"\Account.mdb"
CrystalReport1.SelectionFormula = "{issue.status}='O'"
CrystalReport1.subreportName = "acc1.rpt"
CrystalReport1.DataFiles(1)= App.path&"\Account1.mdb"
CrystalReport1.ReplaceSelectionFormula ("issue.status='O'"
It gives some "Invalid table Name" error and some time
"Selection formula" can't be used with replaceSelectionformula" error.
Is there any method to solve this problem.
Regards,
Ashish Jain
I am developing application in Visual Basic/MS Access/Crystal Report. I am setting database path dynamically for a crystal report dyanmically. e.g.
CrystalReport1.ReportFileName = "acc.rpt"
CrystalReport1.DataFiles(0)= App.path&"\Account.mdb"
CrystalReport1.SelectionFormula = "issue.status='O'"
Its working fine when there is no sub report but when i used subreport in a report. It doesn't set path for subreport dyanmically. I have written code like this way:
CrystalReport1.ReportFileName = "acc.rpt"
CrystalReport1.DataFiles(0)= App.path&"\Account.mdb"
CrystalReport1.SelectionFormula = "{issue.status}='O'"
CrystalReport1.subreportName = "acc1.rpt"
CrystalReport1.DataFiles(1)= App.path&"\Account1.mdb"
CrystalReport1.ReplaceSelectionFormula ("issue.status='O'"
It gives some "Invalid table Name" error and some time
"Selection formula" can't be used with replaceSelectionformula" error.
Is there any method to solve this problem.
Regards,
Ashish Jain