Note that there are some explanatory texts on larger screens.

plurals
  1. POCrystal report asking username and password
    primarykey
    data
    text
    <p>Every time I open my form that has a crystal report it always ask for username and password but i did not even use a username and password in my web application. I use integrated security in my web.config. How can I fix this problem?</p> <p>This is code:</p> <pre><code> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; // FOR CRYSTAL REPORT using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using System.Data; using System.Configuration; // FOR SQL CONNECTION using System.Data.Sql; using System.Data.SqlClient; using MediCard_Cooperative.App_Data; namespace MediCard_Cooperative.MediCard_Cooperative.Reports { public partial class rptTest : System.Web.UI.Page { private SqlConnection connSQL; protected void Page_Load(object sender, EventArgs e) { ReportDocument rptDoc = new ReportDocument(); dsMembers ds = new dsMembers(); // .xsd or dataset filename DataTable dt = new DataTable(); // Set the name of data table dt.TableName = "Crystal Report Members"; dt = getAllData(); // calling 'getAllMembers' function ds.Tables[0].Merge(dt); // .rpt file path "../Reports/SimpleReports.rpt" rptDoc.Load(Server.MapPath("../Reports/CrystalReports/ctrSample.rpt")); //set dataset to the report viewer rptDoc.SetDataSource(ds); ctrViewerTest.ReportSource = rptDoc; } public DataTable getAllData() { try { using (connSQL = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["connstring"].ToString())) { using (SqlCommand cmd = new SqlCommand("usp_Test", connSQL)) { cmd.CommandType = CommandType.StoredProcedure; connSQL.Open(); cmd.ExecuteNonQuery(); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { DataSet ds = new DataSet(); da.Fill(ds, "dtTest"); return ds.Tables[0]; } } } } catch (Exception ex) { throw new Exception(ex.Message); } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload