>Hi,
>
>Can anybody help me on this.
>
>I have a report which is designed in crystal report writer. Inside that report I have three sub reports. Each subreport has its own datafiles. I need to change the datafiles of the subreports when I am running the application. I was able to change the datafiles of the main report, but not for the subreport.
>
>Thanks
You have to set the property in the Crystal object, like this:
oCrystal.subreporttochange="< report name here >".
Beware, the report name is case sensitive (at least in CR6). You can see in the debugger if the .subreportToChange property has accepted your value. After that, do the same as you do for the master report - it will apply to the active subreport. Don't forget to set this property to "" once you're finished.
That's it. HTH