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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:20:15+00:00 2026-05-13T13:20:15+00:00

I have been asked to convert a legacy app containing some crystal reports from

  • 0

I have been asked to convert a legacy app containing some crystal reports from vb6 standalone to .net c# web based application

This is my first .net c# web app so I am learning as I go

My attempts to get crystal reports .net (included version not licensed) have failed.

I was pleasantly surprised to find that I could simply copy the .rpt files into visual studio 2008 and they worked… well almost

opening the .rpt file works fine in the ide, I can view the report and its populated correctly

On the other hand if I try to edit the report from the smart tag in the crystalreportsource (on the aspx page) fails with “report source not configured” even though it is.

at runtime I get the error “report failed to load”

I also need to connect to a SQL database using one of the connection strings provided in web.config this connection string can be changed at runtime (to a training db)

I searched and found several techniques for changing the connection string but any attempt to change the connection properties at runtime fails.

So I was wondering if there are any gotcha’s that I need to know about?

Am I doomed to failure?

If necessary is there an easy way to convert to Microsofts reportviewer?

DC (aka dazed and confused)

RESOLVED: fails with “report source not configured”

The problem appears that a reference wasn’t loaded or was loaded incorrectly I re-added the crystal reports references which immediately crashed VS2008 once restarted I loaded them again and the error disappeared.

DC

  • 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-13T13:20:16+00:00Added an answer on May 13, 2026 at 1:20 pm

    Ok Problems solved. Not ideally but solved any way.

    I have put this here so others may learn from my struggle.

    Crystal reports (v9 included with vs2008) won’t use a SQL (or any other connection) it must use either a dataset or an ODBC connection. As I don’t know much about datasets, so I didnt take this path.

    Crystal reports seems to be designed to use the designer you cannot create it it dynamically. and this is reflected in how hard it is to alter the connection. everything failed until I found this How do I change a Crystal Report's ODBC database connection at runtime? patm’s solution was the one which provided the clues.

    this is my solution c# implemented in the page_load method

            SqlConnectionStringBuilder SConn = new SqlConnectionStringBuilder(_connectionString);
    
            ReportDocument cryRpt = new ReportDocument();
            TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
            TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
            ConnectionInfo crConnectionInfo = new ConnectionInfo();
            crConnectionInfo.ServerName = dsn;// SConn.DataSource;
            crConnectionInfo.DatabaseName = SConn.InitialCatalog;
            crConnectionInfo.UserID = SConn.UserID;
            crConnectionInfo.Password = SConn.Password;
    
            String rpt = Server.MapPath(@"~/reports2/Report1.rpt");
            cryRpt.Load(rpt);
            foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in cryRpt.Database.Tables)
            {
                crtableLogoninfo = CrTable.LogOnInfo;
                crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                CrTable.ApplyLogOnInfo(crtableLogoninfo);
            }
    
            CrystalReportViewer1.ReportSource = cryRpt;
            CrystalReportViewer1.RefreshReport();
    

    dsn is the name of the ODBC connection NOT the server you want to connect to eg. NOT “localhost/sqlexpress”

    I tried many different ways of setting a connection to the database dynamically and only the above worked. my guess is that the others required a fully licensed version of Crystal Reports although none stated it.

    DC

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

Sidebar

Related Questions

I have been asked to convert some Lotus 123 wk4 files with macros to
I have been asked to develop some usercontrols in ASP.NET that will at a
i have been asked the php mail() function, is it send from linux ?or
I have been asked to convert an entire site that is currently using wordpress
I've been asked to convert this statement from PL/SQL to SQL Server: UPDATE pdi_nb_process_complete
I have been asked to build a web application to report on information stored
I have been asked this question and have given this quite some thought but
I am new to LINQ and have been asked to update our existing legacy
I have been asked to perform some logic on an integer, which I think
I have been asked to lend a hand on a hobby project that a

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.