Difficulty: 

If you want to select some data from a subreport inside a report with a different query provided by a VB6 code, you need to follow the steps below:
- Create a report and insert a subreport.
- Use a Crystal OCX component in your VB6 form.
- Create a CrystalReport object. (i.e: Dim Crystal1 as CrystalReport)
- Assign the property SubReportToChange: with this property you can assign values to the subreport you want. (i.e: Crystal1.SubreportToChange = "MySubreport")
- Pass the selection formula to the subreport. (i.e: Crystal1.SelectionFormula = "Your query here")
- Show your report: use the Action event to show your report and the subreport. (i.e: Crystal1.Action 1)

Delicious
Digg
Google
Yahoo