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 8791547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:51:29+00:00 2026-06-13T22:51:29+00:00

I am trying to deploy Crystal Reports in my MVC application. To get full

  • 0

I am trying to deploy Crystal Reports in my MVC application. To get full use of the Crystal Report Viewer, I have to use a webform, which is working fairly well in my dev environment.

The application will be deployed on the user’s servers and connect to their personal dbs. This means I do not have the final connection information when designing the report or the application.

I am able to successfully connect using their entries in the web.config file, load a DataTable with the report information, and pass it to the report. However, the report is still asking for the db credentials. The report is set to connect to my db, so it asks for my credentials and will not proceed without them. However, the final report shows the correct info from their db.

I am not sure if I need to change something in the report, or in the code behind. This is how I am setting the report ReportSource now:

protected void Page_Load(object sender, EventArgs e)
{
    string strReportName = System.Web.HttpContext.Current.Session["ReportName"].ToString();
    try
    {
        ReportDocument rd = new ReportDocument();
        string strRptPath = Server.MapPath("~/") + "Rpts//" + strReportName;
        rd.Load(strRptPath);

        SqlParameter[] sqlParams = {};
        DataTable testDt = DBHelper.GetTable("rptInvtDuplDesc", sqlParams);
        rd.DataSourceConnections.Clear();
        rd.SetDataSource(testDt);
        CrystalReportViewer1.ReportSource = rd;
    }
    else
    {
        Response.Write("<H2>Nothing Found; No Report name found</H2>");
    }
}

How do I prevent the report from asking for the original credentials?

EDIT:

If I pass the login to my db like this:

rd.SetDatabaseLogon("username", "password");

I do not get the db login again. The credentials have to be for the db used to create the report, but the displayed results are from the DataTable populated in the method above. If it has the data it needs from the current db, why does it need to connect to the original db?

EDIT2:

I have 2 data sources for this report. One is a table from the db and the other is the result from a stored procedure. I have now learned that is the cause of the extra login.

  • 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-06-13T22:51:30+00:00Added an answer on June 13, 2026 at 10:51 pm

    You have to provide credentials for each datasouce in the report.

    Ideally, the report will have a single datasource. If this is not possible, you need to provide credentials for each, or data for each.

    Something like this works well if you want to provide the data:

    rd.Database.Tables[0].SetDataSource(testDt);
    rd.Database.Tables[1].SetDataSource(micssys);
    

    Otherwise, something like this will allow the report to access the db directly for each datasource:

    rd.SetDatabaseLogon("username","password}");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to deploy my mvc app into my large web application. I have
I'm trying to deploy my crystal reports windows application project on clients computer. the
I'm trying to deploy my War application in JBOSS 5.1 standalone which has been
I'm trying to deploy an MVC app to a server which is running IIS
I'm trying to deploy my Rails (3.1.3) application to the preprod env. I use
I'm trying to deploy a node.js application to heroku, and get an error: Installing
Hi I am trying to deploy an application using webstart. I have a requirement
I am trying to deploy a web application to a remote server over which
I have just completed developing my web application. I was trying to deploy it
Trying to deploy Spring's mvc-basic in Equinox container. Brief error (full below): org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration

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.