sql server - Crystal Report ask database parameter Login C# -
hello have question c# program, have make prints crystal reports in c # software problem when make printing crystal reports asks database login parameters, how can disable this? thank you
below put picture of code , error
code , error:
errore 2 method:
use setdatabaselogon function
myreport.setdatabaselogon("username", "password", "server", "dbname", false);
if setdatabaselogon function not working ...manually assign connection details each table in reports
connectioninfo conninfo = new connectioninfo(); conninfo.servername = "driver={adaptive server enterprise};server=x.x.x.x;port=x;"; conninfo.userid = "username"; conninfo.password = "password"; tablelogoninfo tablelogoninfo = new tablelogoninfo(); tablelogoninfo.connectioninfo = conninfo; foreach(table table in reportdoc.database.tables) { table.applylogoninfo(tablelogoninfo); table.logoninfo.connectioninfo.servername = conninfo.servername; table.logoninfo.connectioninfo.databasename = conninfo.databasename; table.logoninfo.connectioninfo.userid = conninfo.userid; table.logoninfo.connectioninfo.password = conninfo.password; // apply schema name table's location table.location = "dbo." + table.location; }
Comments
Post a Comment