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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:01:18+00:00 2026-06-18T05:01:18+00:00

I have some Crystal Reports off a customer which I need to link to

  • 0

I have some Crystal Reports off a customer which I need to link to an ASP.NET application we are creating. I have the following code:

 LINQDataContext dc = new LINQDataContext();
        Order o = dc.Orders.Where(a => a.ID == long.Parse(Request.QueryString["OrderID"])).Single();
        SqlConnectionStringBuilder bld = new SqlConnectionStringBuilder(dc.Connection.ConnectionString);
        CrystalReportSource src = new CrystalReportSource();
        src.ID = "test";
        ConnectionInfo myConnectionInfo = new ConnectionInfo();

        myConnectionInfo.ServerName = bld.DataSource;
        myConnectionInfo.DatabaseName = bld.InitialCatalog;
        myConnectionInfo.UserID = bld.UserID;
        myConnectionInfo.Password = bld.Password;

        src.Report.FileName = o.SalesPersonObject.GetType().GetProperty(Request.QueryString["DeliveryNoteType"]).GetValue(o.SalesPersonObject, null).ToString();


        ParameterDiscreteValue param = new ParameterDiscreteValue();
        param.Value = long.Parse(Request.QueryString["OrderID"]); 
        src.ReportDocument.ParameterFields[0].CurrentValues.Add(param); 

        CrystalReportViewer vw = new CrystalReportViewer();
        src.ReportDocument.SetDatabaseLogon(bld.UserID, bld.Password);
        vw.HasToggleGroupTreeButton = false;
        vw.AutoDataBind = true;
        vw.Height = 1268;
        vw.Width = 1000;
        vw.HasPrintButton = true;
        vw.PrintMode = PrintMode.Pdf;
        vw.ReportSource = src;
        //vw.EnableDatabaseLogonPrompt = false;
        vw.HasToggleParameterPanelButton = false;
        vw.HasCrystalLogo = false;
        vw.RefreshReport();
        plcReport.Controls.Add(vw);

However, even though I’m setting the username/password using the SetDatabaseLogon method, I’m still getting a prompt to enter the database login details, or more specifically to enter the password. I’ve tried using vw.EnableDatabaseLogonPrompt = true, but that gives me a database login issue.

Any ideas?

  • 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-18T05:01:20+00:00Added an answer on June 18, 2026 at 5:01 am

    See how I helped another SO user who was facing a similar problem .I hope you will be able to get something valuable.

    Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.Net (.Net 2.0) application that creates Crystal Reports (version 11.5) and
I'm working on a ASP.Net application (.Net 1.1) with Crystal Reports 2003. I have
I need some clarification. I have a Reportwriter dll that uses Crystal Reports. It
I am updating an existing reporting system in ASP.NET which uses crystal reports. In
I have embedded some crystal reports in my C# application. The problem is, compiling
I've made an vb.net application that requires crystal reports 10 and I need to
I have an application (NOT MY Coding) which have a lot of crystal reports.
I have an ASP.NET web service which does some heavy lifting, like say,some file
I have some Crystal Reports connecting to a Sql Server db that I would
I have some reports developed using Crystal Reports 12 and I want to version

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.