Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Crystal reports - Microsoft Access - 64bit OS

$
0
0

Hi Marko,

 

The table name from the report info:

 

// get the DB name from the report

CrystalDecisions.CrystalReports.Engine.Database crDatabase;

CrystalDecisions.CrystalReports.Engine.Tables crTables;

crDatabase = rpt.Database;

crTables = crDatabase.Tables;

int dbx = 0;

 

foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)

{

    if (crDatabase.Tables.Count != 0)

    {

        CrystalDecisions.Shared.NameValuePair2 nvp2 = (NameValuePair2)rpt.Database.Tables[dbx].LogOnInfo.ConnectionInfo.Attributes.Collection[1];

        btnSQLStatement.Text += "\nRPT Data Source Info: \n" + " Server Name: " + rpt.Database.Tables[dbx].LogOnInfo.ConnectionInfo.ServerName.ToString() + "\n Database Name: " + nvp2.Value.ToString() + "\n Table Name: " + rpt.Database.Tables[dbx].Name.ToString();

        if (rpt.Database.Tables[dbx].LogOnInfo.ConnectionInfo.UserID != null)

            btnSQLStatement.Text += "\n User ID: " + rpt.Database.Tables[dbx].LogOnInfo.ConnectionInfo.UserID.ToString() + "\r\n";

        dbx++;

    }

    else

        btnSQLStatement.Text += "No Data source or not found\r\n";

}

 

Don


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>