locked
Crystal Report & SQL Server Windows Authentication RRS feed

  • Question

  • User1393768501 posted

    HI All!

    I am having trouble using Windows Authentication with Crystal report.

    I have web Application that will display the report on the browser at runtime

    It works fine when I used Sql server authentication, but we need to support windows authentication as well.

    And when i am trying to do Windows Authentication, it is prompting me again and again for DB creadintials.

    If I give the windows Domain user credintials it works, I don't really understand why it is not working without userid and pass.

    But the same is working if am using it on windows desktop application.

    I would like to know is it possible to work with crystal reports using windows authentication on web application?

    I am using VS 2010 & CR 13.0

    Tuesday, December 20, 2011 7:52 AM

Answers

  • User1393768501 posted

    Issue is with the report file not in the way I am trying to connect.

    For windows authentication we need diffrent report file, it seems the rpt file is itself containing the db metadata info.

    I can't use Sql server auth report on windows auth connection.

    Moreover I have to define windows user name and password while trying to connect, and after that everything work like a charm.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 26, 2012 6:27 AM

All replies

  • User1196771204 posted

    hi sanjay,

    do you run your own server or do you host your crystal report on a shared server? If you host it on a shared server, you need to ask your host to check on the folder permission 

    Wednesday, December 21, 2011 1:13 AM
  • User1393768501 posted

    Issue is with the report file not in the way I am trying to connect.

    For windows authentication we need diffrent report file, it seems the rpt file is itself containing the db metadata info.

    I can't use Sql server auth report on windows auth connection.

    Moreover I have to define windows user name and password while trying to connect, and after that everything work like a charm.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 26, 2012 6:27 AM
  • User-733996868 posted
    hope this helps u 
    
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument crystalReport = new ReportDocument();
        crystalReport.Load(Server.MapPath("CrystalReport.rpt"));
        crystalReport.SetDatabaseLogon("username", "password", @"server name", "DB name");
        CrystalReportViewer1.ReportSource = crystalReport;
    }
    try this hope  it will help

    Thursday, April 26, 2012 9:29 AM
  • User1393768501 posted

    Thx! narasappa

    I was doing the same thing but the problem is with report file and that was resolved  now.

    Friday, April 27, 2012 2:16 AM
  • User-1827300673 posted

    Hate to resurect this thread, but I have been looking for something similar.  I don't want to pass a set username and password, I want to pass the one they are logged in as..  This works fine if I hard set the information, but what about passing it through?

    Wednesday, June 13, 2012 12:03 PM