Solved

Error when trying to use Crystal Reports Viewer in ASP.NET

Posted on 2008-10-23
7
1,244 Views
Last Modified: 2013-11-26
When trying to view a Crystal Reports report (.rpt) file through a web page using the Crystal Reports Viewer control it keeps giving me the error that crdb_p2bxbse.dll could not be found or loaded.  That DLL was not found on my server, even though Visual Studio 2008 is installed.  I have extracted the DLL from the Crystal Reports CAB files and placed it in System32, Windows, and also tried the bin folder for my web app.  Same error message each time.

For the page I have only placed the viewer control on the page, and set the report source property in the code behind.  As you can see I have left this page as simple as possible.  Is there more that I need to do to make this work?  

Thanks for help.
<body>

    <form id="form1" runat="server">

    <div>

        <CR:CrystalReportViewer ID="rptView" runat="server" AutoDataBind="true" />

    </div>

    </form>

</body>

</html>

 

 

using System;

using System.Data;

using System.Data.SqlClient;

 

public partial class REPORTS_Metro_report : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

        string report = Request["rptID"];

                SqlConnection con = Utilities.getConnection("Lansa_ConnectionString");

        SqlCommand cmd = new SqlCommand();

        cmd.Connection = con;

        cmd.CommandType = CommandType.Text;

 

        cmd.CommandText="SELECT reportName from tblReports WHERE id=" + report;

        string name="";

        con.Open();

        name=cmd.ExecuteScalar().ToString();

        con.Close();

 

        if (name.Length>0){

            rptView.ReportSource="files/" + name;

//            rptView.ReportSource=Server.MapPath("files/" + name);

        } 

    }

}

Open in new window

0
Comment
Question by:GeoffSutton
  • 5
  • 2
7 Comments
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22790182
Here is the complete error message:

Failed to load database information. Details: The database DLL 'crdb_p2bxbse.dll' could not be loaded. Error in File C:\WINDOWS\TEMP\ME2P_Placements {217DC300-A637-4C9B-BFCE-634327230F1A}.rpt: Failed to load database information.

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22790210
Did you register the database driver?

mlmcc
0
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22790231
Which database driver?  I know nothign about crystal reports, so I am going to assume "no, I did not"
 How would I go about doing this?  I tried regsvr32 crdb_p2bxbse.dll but it told me it could not be registered.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 22790891
That is the driver.  I wasn't sure if the drivers got registered or if they had to be in a specific directory.

Did you try
Program Files/Common/Business Objetcs

mlmcc
0
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22791126
I searched the entire system.  That driver is not found.  Did some further digging, and have installed the XI .NET server onthe system, still no results.  Just figured out that the database files need to be in the same folder and am copying them now.  Hoping that will help.  I will install the FULL XI server next if this fails and recreate the reports there.

Geoff
0
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22791283
Ok.  I managed to install the driver with the XI server install.  The file is now in C:\Program Files (x86)\Common Files\Business Objects\3.0\bin.  When I tried regsvr32 C:\Program Files (x86)\Common Files\Business Objects\3.0\bin\crdb_p2bxbse.dll I receive the message "C:\Program Files (x86)\Common Files\Business Objects\3.0\bin\crdb_p2bxbse.dll was loaded, but the DllRegisterServer entry point wasnot found. This filecan not be registered."

Do I have to register it with the ASP.NET application?  If not, where should I go from here?

Thanks for the help on this one.

Geoff
0
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22791390
Ok.  I've managed a partial solution.  It appears that until these reports are recreated on this machine, the best I can do is work through the previous webserver which had a viewer in place and was pointing to another system with the reports.  I am going to try and cut out the middleman, but the problem isn't crystal reports or the server or even .NET.  It seems the problem is my lack of understanding on how CR operates.  

Thanks for the help which pointed me in the right direction.  I'll give you the points because frankly, they don't do me any good and your help kept me plugging at it.

Thanks again.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
getting id from database 5 24
c# if statement weird reaction 3 29
Format column on datatable 7 17
Adjust the position 3 12
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now