Skip to Content
0
Jun 11, 2020 at 10:03 AM

Apply Join in tables through Cystal report SDK C#

214 Views

Hi,

I am using C# to migrate Crystal report 8.5 to Crystal report16.

As of now I am using following code to execute query:

CrystalDecisions.Shared.ConnectionInfo ConnInf;
ConnInf = reportDocObject.Database.Tables[0].LogOnInfo.ConnectionInfo;

String strTableName = reportDocObject.Database.Tables[0].Name;

reportDocObject.SetSQLCommandTable(ConnInf, strTableName, combinedQuery);// crptModel.strSQLClause);
reportDocObject.VerifyDatabase();

crystalReportViewerBrz.ReportSource = reportDocObject;

Above code is working fine if I set query that has on table in "From" Clause but do not work if query has join statement and get records from two tables.

I am using SDK2017 and Crystal report 2016 with Visual Studio2019.

Please suggest if it possible to execute Query like above way using join in SQL statement.