Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this My code
I have Server with Ip Address 192.168.5.44
When I print By Crustal Report It Asking Password
C#
try
{
     string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
     using (SqlConnection con2 = new SqlConnection(CS))
     {
         ReportsBasikData.ReportCatCustomers2 reportcustomer = new ReportsBasikData.ReportCatCustomers2();
         reportcustomer.SetDatabaseLogon("pc1", "Abdo1379", "con2", "MnStores", false);
         reportcustomer.SetParameterValue("@catId", this.dataGridView1.CurrentRow.Cells[0].Value.ToString());     

         ReportsBasikData.FormData fmct = new ReportsBasikData.FormData();
         fmct.crystalReportViewer1.ReportSource = reportcustomer;
         fmct.ShowDialog();
     }
}
catch { }
Posted
Updated 20-Sep-15 23:08pm
v2
Comments
aarif moh shaikh 21-Sep-15 5:48am    
Set this authentication in web.config file
Member 11280947 21-Sep-15 8:52am    
How ?
aarif moh shaikh 24-Sep-15 0:44am    
do google

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900