i use crestal report xi & vb.net & database ms sql server 2000
when i need to run the report from vb.net i use this code
and its okCode:Sub vrep(ByVal vsql As String, ByVal vname As String) Cn.Execute("Drop View " & vname) Cn.Execute("Create View " & vname & " as " & vsql) Dim sql As String = vsql Dim da As New SqlClient.SqlDataAdapter(sql, Col) Dim ds As New DataSet Dim FrmCrystalReport As New FrmPrivew Dim CrystalReport As New report filse ds.Clear() da.Fill(ds, vname) CrystalReport.Database.Tables(0).SetDataSource(ds) FrmCrystalReport.CrystalReportViewer1.ReportSource = CrystalReport FrmCrystalReport.Show() End Sub
but now i make report contains a subreport plz help me to Modified the code
Because the report in this case contains two reports and two queries
And when i used the previous code does not update the data in the subreport




Reply With Quote
