all groups > visual studio .net general > october 2003 >
You're in the

visual studio .net general

group:

Crystal Reports with web forms, subreports


Crystal Reports with web forms, subreports rg
10/31/2003 8:22:21 AM
visual studio .net general:
I'm using crystal reports v9 in which the datasource is
from a dataset. the report has a subreport
i set the datasource location for the main report to an
xml schema of table1, and the subreport to an xml schema
of table2.

my code that populates the data creates a dataset from
these two tables.
sql = "select * from table1"
oledbadapter = new oledbadapter(sql, adooledbconnection)
adoOleDbAdapter.fill (dataset1, "Table1")
sql = "select * from table2"
oledbadapter = new oledbadapter(sql, adooledbconnection)
adoOleDbAdapter.fill (dataset1, "Table2")

myreport.load ("report.rpt")
myreport.setdatasource(dataset1)

The parent report populates with data, but the subreport
does not. Does anyone know how to handle this? Thank you
for responses.
Crystal Reports with web forms, subreports rg
11/4/2003 9:14:57 AM
i think my problem is with loading a subreport
do this
myreport.opensubreport(C:\report.rpt").setdatasource
(ds.tables(1))

and get an error loading.
can the subreport be embedded in the parent report or must
it be a separate file? what an i doing wrong? anyone?
AddThis Social Bookmark Button