Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Logon Failed Error For Crystal Report.

Logon Failed Error For Crystal Report.

Scheduled Pinned Locked Moved C#
helpcsharp
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sanket Patil
    wrote on last edited by
    #1

    Hi Everybody, Please help me to solve my problem. I am developing an window application in C#, in that I have designed some crystal report. All this crystal reports are running properly on my development machine. But When deployed at client machine, whenever the user views the report it ask for login name and password. I have given logon information through my code using TableLogInfo. But still While viewing the report, it asks for Login name and password. Please Provide Me The Better Solution You Have. Thanks & Regards Sanket Patil.

    .

    A T 2 Replies Last reply
    0
    • S Sanket Patil

      Hi Everybody, Please help me to solve my problem. I am developing an window application in C#, in that I have designed some crystal report. All this crystal reports are running properly on my development machine. But When deployed at client machine, whenever the user views the report it ask for login name and password. I have given logon information through my code using TableLogInfo. But still While viewing the report, it asks for Login name and password. Please Provide Me The Better Solution You Have. Thanks & Regards Sanket Patil.

      .

      A Offline
      A Offline
      Alok Sharma ji
      wrote on last edited by
      #2

      it is asking your db login name and passowrd, anyways a lil bit of code will help you fast.

      All work and no play make jacks a dull boy.

      S 1 Reply Last reply
      0
      • A Alok Sharma ji

        it is asking your db login name and passowrd, anyways a lil bit of code will help you fast.

        All work and no play make jacks a dull boy.

        S Offline
        S Offline
        Sanket Patil
        wrote on last edited by
        #3

        Hi Alok Sharmaji, Thanks For Your Reply. But Let me know what type of lil bit of code will help me. If you have please send me an sample code. Please help me. Thanks & Regards Sanket Patil.

        .

        A 1 Reply Last reply
        0
        • S Sanket Patil

          Hi Alok Sharmaji, Thanks For Your Reply. But Let me know what type of lil bit of code will help me. If you have please send me an sample code. Please help me. Thanks & Regards Sanket Patil.

          .

          A Offline
          A Offline
          Alok Sharma ji
          wrote on last edited by
          #4

          have you tried what i said to you, if not do so, also from lil bit of code i meant of ur code snipt to see what you have done so far(LOL) anyways read here[^]

          S 1 Reply Last reply
          0
          • A Alok Sharma ji

            have you tried what i said to you, if not do so, also from lil bit of code i meant of ur code snipt to see what you have done so far(LOL) anyways read here[^]

            S Offline
            S Offline
            Sanket Patil
            wrote on last edited by
            #5

            Hello Alok Sharma Ji, Thanks Once Again For The Reply. What I Have Done In My Code Is Here.

            ALLEXE = new PayrollSoft.Report.AllowanceExempt();

                            tblinfo = new TableLogOnInfo();
                            foreach (Table Atbl in ALLEXE.Database.Tables)
                            {
                                tblinfo = Atbl.LogOnInfo;
                                tblinfo.ConnectionInfo.ServerName = objcon.GetServerName();
                                tblinfo.ConnectionInfo.DatabaseName = objcon.GetDatabaseName();
                                tblinfo.ConnectionInfo.UserID = objcon.GetUserId();
                                tblinfo.ConnectionInfo.Password = objcon.GetPassword();
                                if (objcon.GetTrustedConnection().ToUpper().Equals("YES"))
                                    tblinfo.ConnectionInfo.IntegratedSecurity = true;
                                else
                                    tblinfo.ConnectionInfo.IntegratedSecurity = false;
                                Atbl.ApplyLogOnInfo(tblinfo);
                            }
            
                            ALLEXE.RecordSelectionFormula = "{ALLOW\_EXEMPT.IA\_CM\_CODE}= " + Masters.MainMaster.CMPID + " AND {ALLOW\_EXEMPT.IA\_YEAR}=" + cmbYear.Text.Remove(4, 1) + " AND {ALLOW\_EXEMPT.IA\_DELETE}=false " + Query;
                            StrCompanyName = objcon.GetColumn("Select CM\_COMP\_NAME from COMPANY\_SETTING WHERE CM\_COMP\_ID=" + Masters.MainMaster.CMPID + "");
                            ALLEXE.SetParameterValue("companyname", StrCompanyName);
                            crystalReportViewer2.ReportSource = ALLEXE;
                            this.Show();
            

            Hope This Is The Right Way to Provide Logon Information To Report. Thanks & Regards Pankaj Patil.

            .

            1 Reply Last reply
            0
            • S Sanket Patil

              Hi Everybody, Please help me to solve my problem. I am developing an window application in C#, in that I have designed some crystal report. All this crystal reports are running properly on my development machine. But When deployed at client machine, whenever the user views the report it ask for login name and password. I have given logon information through my code using TableLogInfo. But still While viewing the report, it asks for Login name and password. Please Provide Me The Better Solution You Have. Thanks & Regards Sanket Patil.

              .

              T Offline
              T Offline
              thatraja
              wrote on last edited by
              #6

              You need to set login at runtime. Refer this C# Crystal Reports Dynamic Logon parameters[^]

              thatraja |Chennai|India|


              Brainbench certifications
              Down-votes are like kid's kisses don't reject it :-)
              Do what you want quickly because the Doomsday on 2012 :-)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups