you have to link the subreports tables to the datasource to
// please convert C# to VB yourself
// link the tables for the subreports
CrystalDecisions.Shared.TableLogOnInfo currentTableLogOn;
CrystalDecisions.Shared.ConnectionInfo cnCurrentConnectInfo;
// set here the connection parameters
foreach(CystalDecisions.CrystalReports.Engine.ReportDocument subReport in crReport.Subreports)
{
foreach (CrystalDecisions.CrystalReports.Engine.Table reportTable in subReport.Database.Tables)
{
currentTableLogOn = reportTable.LogOnInfo;
currentTableLogOn.ConnectionInfo = cnCurrentConnectInfo;
reportTable.ApplyLogOnInfo(currentTableLogOn);
}
}
Edited by CsharpCoding - 17 Feb 2012 at 10:29am