Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to establish if an enforced join has been made between two table in c#

Dear Forum

Is there a method avaialble in c# to establish if an enforced inner join has been made between two tables for crystal reports.

This query follows on from one i posted a few days ago ref data security.

We have a method of securing the data using a combination of a stored procedure and views. But the process requires a enforced inner join between the SP and the views.

The idea being if the SP is in place and has a enforced inner join then data is secure.

We require a method in code of establishing if this join is in place from the perspective of the SP

Any ideas would be welcome

Thank you all in advance



Hi Paul,

There are Linking API's but I don't believe they will return the type of link you are using and it's not clear if the link is done in CR or in the SP?

One option you can use is to get the SQL CR has in the report and parse it to determine if the join exists, assuming the join is done in CR, if it's not then the users won't be able to change it in CR.

To get the SQL CR uses:

GroupPath gp = new GroupPath();

string tmp = String.Empty;



rptClientDoc.RowsetController.GetSQLStatement(gp, out tmp);

MessageBox.Show(tmp, "SQL Statement: ", MessageBoxButtons.OK, MessageBoxIcon.Information);;


catch (Exception ex)


btnSQLStatement.Text = "ERROR: " + ex.Message;



To get the links use this API: CrystalDecisions.CrystalReports.Engine.Database.Links

And to get the link Types: CrystalDecisions.Shared.LinkJoinType

Check the SDK help file for more info and the Object Browser also.

Thank you


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question