Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6147417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:06:23+00:00 2026-05-23T19:06:23+00:00

When o load my Crystal Report onto a CrystalReportViewer i am prompted with Database

  • 0

When o load my Crystal Report onto a CrystalReportViewer i am prompted with Database Login with disabled (fixed) server name.

Now when i load the same report on my development machine, it works fine. but when i deploy the C# application on a different machine, i am always prompted for a DB Login. (where the server-name is the one used on my development machine and its static (i cant change it)

i have been trying to find a solution for weeks now and with no luck.

i am using a DataTable as a report source :

MyReport.SetDataSource(MyDataTable)

i have tried most of the online solutions that i searched for.

i have tried passing the DB Login information at run-time

i have installed the SQL Native Client

i have tried to pass a DataSet instead of a DataTable

All with no luck

it also came to my understanding that when i load a report with 1 database table inside i am not prompted for database login (i.e. my datable will be filled with one table form the database : "Select * From SomeTable" when i use an inner join query i am prompted for the login

Any thoughts anyone on how to handle this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:06:24+00:00Added an answer on May 23, 2026 at 7:06 pm

    well i have finally solved it i was using

    cr.SetDatabaseLogon(Username, Password, @Server, DBNAME);
    

    i replaced that code and passed the login information for each table used in the report

    T

    ableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
                    TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
                    ConnectionInfo CInfo = new ConnectionInfo();
                    //GET THE SERVER INFORMATION
                    DataTable DT = b.GetServerInfo();
                    CInfo.ServerName = DT.Rows[0][1].ToString();
                    CInfo.DatabaseName = DT.Rows[0][2].ToString();
                    CInfo.UserID = DT.Rows[0][3].ToString();
                    CInfo.Password = DT.Rows[0][4].ToString();
                    Tables CrTables = cr.Database.Tables;
                    foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
                    {
                        crtableLogoninfo = CrTable.LogOnInfo;
                        crtableLogoninfo.ConnectionInfo = CInfo;
                        CrTable.ApplyLogOnInfo(crtableLogoninfo);
                    }
    
    
                    frmReportViewer ff = new frmReportViewer();
                    ff.crViewer.LogOnInfo = crtableLogoninfos;
                    ff.crViewer.ReportSource = cr;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When i execute crystal report it gives an error Could not load file or
I'm quiet new to Crystal report but expert with SSRS. I'm trying to load
Im trying to load a xml file into a dataset and generate crystal report
i am new to crystal report. I now facing a problem. How can i
Crystal Report 10 fails to load on Windows 2003 OS. We're developing with .net
I'm trying to obtain the Oracle package name used for a Crystal report data
I made a report using crystal report and in the page load I am
I want to generate crystal report in pdf format. I had done the same
I'm using Crystal Reports 11 (and VB6) to open a report file, load the
I was just wondering how to pass SQL to crystal report. Right now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.