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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Subreport 1

Status
Not open for further replies.

benlinkknilneb

Programmer
May 16, 2002
590
US
Hey all,

I'm writing an app in VB.net that uses CR and I was wondering if it's possible to SetDataSource(___) of a subreport. I've got this set of reports that all has the same parent report and the same structure, but different data sources depending on the user's selection (it's making scatter plots and the user chooses the value for one of the axes). Is there a way to set the data source of the subreport in VB, without changing the parent report?

Ben
 
Check:


or

StrSQL = "Select * FROM "QueryName" WHERE "criteria".
Set crApp = New CRAXDRT.Application
Set cr = crApp.OpenReport(App.Path & "ReportName")

Set crSub = cr.OpenSubreport("SubReportName")

Dim rsSubrpt1 As Recordset
Dim StrSQL1 As String

Set rsSubrpt1 = New Recordset
StrSQL1 = "Select * From "QueryName" WHERE "criteria"

rsSubrpt1.Open StrSQL1, g_conn, adOpenStatic, adLockReadOnly
crSub.Database.SetDataSource rsSubrpt1

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top