Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data files

Status
Not open for further replies.

ashishjain

Programmer
Feb 20, 2002
32
0
0
IN
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top