Home » Visual Studio

connect crystal report viewer to sql 2008

Using visual studio 2008, I have connected crystal reports to sql 2000 using the code behind below.  I have upgraded to sql 2008 and now when the page runs it keeps asking for a password, even after I put in the odbc password.  I have updated my odbc.  The report runs fine from within visual studio.  Appreciate any help.

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared


PartialClass FivePlusSuspensions

    Inherits System.Web.UI.Page



    PrivateSub ConfigureCrystalReports()

        Dim myConnectionInfo As ConnectionInfo = New ConnectionInfo()

        myConnectionInfo.ServerName = "odbc Name"

        myConnectionInfo.DatabaseName = ""

        myConnectionInfo.UserID = "odbc id"

        myConnectionInfo.Password = "odbc password"



    PrivateSub setDblogonforReport(ByVal myconnectioninfo As ConnectionInfo)

        Dim mytableloginfos AsNew TableLogOnInfos()

        mytableloginfos = CrystalReportViewer1.LogOnInfo

        ForEach mytablelogoninfo As TableLogOnInfo In mytableloginfos

            mytablelogoninfo.ConnectionInfo = myconnectioninfo



    ProtectedSub Page_Init(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Init







1 Answer Found


Answer 1

The only suggestion I can make is to try pulling the data into a dataset first and then hand the dataset to the report. Does that work with the new server?





Hi all - I'm trying to use the Crystal Report Viewer for Visual Studio 2010 with Crystal Reports Server 2008, and I'm not having much success.  I'm attempting to view the report from an ASP.Net page.

I have this code in an ASP.Net Page:

string serverName = "MyServer";

SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession = sessionMgr.Logon("User", "Password", serverName, "secEnterprise");

EnterpriseService enterpriseService = eterpriseSession.GetService("InfoStore");
InfoStore infoStore = new InfoStore(enterpriseService);
InfoObjects infoObjects = infoStore.Query("SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Report' AND SI_NAME LIKE 'MyReportName%' AND SI_INSTANCE=0");

InfoObject infoObject = infoObjects[1];
enterpriseService = enterpriseSession.GetService("RASReportFactory");
Object rrfObject = enterpriseService.Interface;
ReportAppFactory reportAppFactory = (ReportAppFactory)rrfObject;

ReportClientDocument reportClientDocument = reportAppFactory.OpenDocument(infoObjects[1]);
CrystalReportViewer1.ReportSource = reportClientDocument;

When the OpenDocument call is made, I get an exception: "The parameter was incorrect".  Note that most of the sample code that I've found passes the ID property of the InfoObject, but that gives me another exception: "No such interface supported". 

I've also tried to use the DSWSPortal sample from BusinessObjects to access the report via a web service, but drilldown doesn't work: the javascript to do a drilldown doesn't exist on my system.  I've installed both the Crystel Reports Viewer 2010 and the .NET SDK from Crystal Reports Server 2008.

Am I just missing something really obvious?





hi, i decided to export my local site to iis today, the process wasn't smooth.


anyway. i was able to access my site, the db tables are working as i am able to create new records and retrieve them. my main problem now is with the report object. i've tried the work around found here : http://support.microsoft.com/kb/2002980.. it helped sort of. i used to have only a big page of error before i did the work around, now i am able to see half of the report (the report interface) but the contents, the field are filled with 404 errors.

any idea how i can fix this??











When my SQL Server 2008 trial expired I could no longer buy the developer edition of that product.  I was forced to buy 2008 R2, which I have done and installed.  Now I can no longer connect Crystal Reports to my SQL Server. As a provider of Crystal Report development to thousands of customers worldwide this is a problem. 

Does someone have a workaround/ something I could install to allow 32 bit connections of my 2008 R2 SQL Server?


I am developing a windows forms application with crystal reports in it, when crystal rep, viewer is connected to DB it is asking for login ID  and password which is not set, i tried with empty password and Login and used intergrated security option, but doesnt worked

how to view reports without loging?

i am using .accdb file of MS-Access 2007 

//code behind

ldata.DataSourceConnections[0].SetConnection(AppL.FilePath, AppL.FilePath,

true); // where 'ldata' is crystal report


ReportViewer.ReportSource = ldata;





I wrote a stored procedure in an oracle development database, pointed crystal reports to it, added fields,etc and it works just fine.


i changed the datasource to a the same exact procedure in an a different instance and it runs just fine in designer.


however, when i try to run it with the CR .net viewer, I get:


Cannot determine the queries necessary to get data for this report. Error in File Report1005 {92649FF7-BD4F-4175-8D9C-A1165637C843}.rpt: Failed to retrieve data from the database.


crystal reports 2008 designer (all service packs) oracle 10g


Any help would be appreciated.




I would like to give feedback to the sql reporting services advanced team

I would love to see  sql report viewer using silverlight I am a bit
disappointed that it is not available now. 
Can we  expect this in  with vs 2010?
Thank you


I am trying to put a crystal report viewer into MVC. When I point a report to the viewer, this is what I get.

The report is able to display however there are these box surronding the textfield objects of the crystal report.

The attached image is what is being displayed when I view my report on a view.

Crystal report rendering problem


hi...to all
i want to generate the two crystal reports one is employee and another is project.
now i want to display the two reorts in a single crystal report viewer. i've tried
using sub-reports but the page header is not avaliable in a sub reports..
 so i want to display two separate crystalreports in a single viewer..
can anybody help me.. plzCryCry


I have an ASP.NET web-application project which generates a crystal report (CR.NET with VS-2005) which shows about 7,500 records. When the report is loaded in the report viewer, it gives an “out of memory” exception on the report viewer in IE-8 and “Error: Fail to render the page” in Mozilla Firefox. The report is perfect when exported in excel or pdf. Only in IE-6, it does not give the exception, but shows some records, changes the alignment of some of the records and doesn’t show the rest. The total size of the records is only around 500KB.

What should i do to get rid of this error?


hi, all

I have been developing a windows application and I found that in some reports its taking a lot time to render reports on the ReportViewer form. Though my datasource came from database and all are there but still its taking long time.. 

Is there any way to show hour glass icon or Progress bar that shows to user.. Report is being rendering.


I am using VS.net 2003

Deployed program, no problems indicated. Loaded program on my laptop. Program runs except when i click to print a report. Get the error "Load report failed".

what did I forget to do?



i have adynamic dataset wuch i create and not from sql or access table

i have acrystalreport

and i want to connect the report to the dataset



Adnan Mahajna 


I am able to run crystal report on vs 2010, whenever i run report it ask me to enter details e.g server name, database name and sa password. then it connects and brings the report. this shouldnt happen,  i want to do it programatically.




Greetings All!

I have used the Crystal Reports Runtime (x86 and x64) for the last couple of years simply by deploying my application and installing the Run Time separate from my application. It hasn't given me any issues...until now. If I try to run a crystal report that has a non-standard Crystal DLL in it I receive a message during the report load that it can't find a specific DLL. In this case its a u2ltdate.dll which is used in a lot of the Crystal Reports we have designed over the last several years. One of the formula functions this DLL uses is the "NumberToDate" function, since much of the date data that we work with is stored as an integer value "YYYYMMDD" format it's much simpler to call this function in a Crystal Formula than do the Mid/Left/Right string manipulation. Most of the reports are designed in Crystal 10, and some are in 8.5

I first noticed an issue when I upgraded my development PC to Windows 7 x64. When I design reports in Crystal 10 I am able to use the u2ltdate.dll with no issues, but if I try to call that same report from my application using the Run Time I receive a missing DLL error. I assumed this was an issue related to being on a 64-bit platform, and since most of our clients weren't even on Windows 7, or 64 bit systems I didn't have any issues deploying my applications the usual way. Well the inevitable has now happened so it's time for me to get a solution for this. I suspected that I would get the same message on my client's 64 bit W7 PC and that is exactly the case.

Here is the exact error message: "UFL 'u2ltdate.dll' that implements this function is missing. Error in File C:\Users\username\AppData\Local\Temp\Report Name{GUID}.rpt: Error in formula <date>. 'NumberToDate({Table.Field})' UFL 'u2ltdate.dll' that implements this function is missing."

I have tried putting the DLL into the following folders with no success. 'C:\Windows\Crystal', 'C:\Program Files\Business Objects\Common\2.8\bin', 'C:\Program Files (x86)\Business Objects\Common\2.8\bin', 'C:\Windows\system32\', 'C:\Windows\SysWOW64'

I have tried registering the DLL using regsvr32 <dll path> and that has not worked either. Anybody have any ideas on how I can use this u2ltdate.dll in the Run Time on a 64 bit system? Any and all information will be appreciated!


Jeremy Wolverton

Hi again,
has anybody a version comparison list (feature list) about SQL 2008 R2 Reporting Services and SQL 2008 R2 Express Reporting Services?
I realized only two differences:
1. There is no Report Designer in the Express-Edition
2. You can' t use shared DataSets in the Express-Edition
Best Regards



          I have sql report services(2008) and report databases on same machine which is 32 bit

i want to migrate sql report services and report databases to sql 2008 r2( which is 64 bit machine)...

Can you guys suggest me any document or link to migrate ssrs from one server to another server



I am using SSRS 2008 in integrated mode on a WSS 3.0 site.  I have a report with a matrix in it.  THere are two columns (Project/task).  When I expand the project column (clicking +), the tasks will show up.   Everything works fine in BIDS.  But when I try to view the same report in WSS, the numbers in the columns beyond task get pushed over by 1 column whenver I expand the project column.  

For example, this is what the report looks like before I expand the project column -

Project              MTD    YTD
+ProjectA           100    200
+ProjectB           300    400

After I click +, I get

Project              MTD    YTD
+ProjectA       Task 1     10    20
                      Task 2    90    180
+ProjectB           300    400

Does anyone know how to fix this?




I have SQL 2008 r2 Developer's Edition onto a virtual machine, set up a Reporting database, etc. 

I would like to enable my team to use Report Builder 3.0 to create reports.  They can launch Report Builder, however when they connect to the Shared Data Source (enter SQL login username/password which has dbowner privs on the Reporting database), they get the following error:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

I have looked all over the internet for a solution... nobody seems to have this.

I CAN connect to Report Builder from the local machine.  However, whenever ANOTHER machine attempts to launch Report Builder from the Report Manager... this happens. 

Any ideas?

Many thanks.



Is it possible to connect directly from Report Builder 2.0 to a remote SQL Server 2008 Express reporting server? My setup is as follows. We have a server running SQL Server 2008 Express with advanced technologies on a remote server. We would like our client to be able to create reports locally on their PCs using Report Builder 2.0 and run them locally as well. When I do this I keep on getting

"Failed to preview report: The request failed with HTTP status 401: Unauthorized."

As I am able to create the report (and thereby see the tables and structure on the remote server) I don't understand why I am getting this message. Also, I am able to upload the report to the report server and view it that way. I just can't preview the report from within Report Builder 2.0.

I read that the express edition of SqlServer 2008 does not allow direct connections from Report Builder 2.0. The comparison chart is here:


And SqlServer 2008 does not have a tick next to "Ad-hoc Reporting (Report Builder)", but I am not sure exactly what that means. However this does work when running Report Builder locally on the remote server. It just doesn't work over a remote connection.

Could someone please confirm that Sql Server Express does not permit direct remote connections from Report Builder for preview purposes - rather than that I have a connection/credential issue. I still think it's the latter as it works when running report builder 2.0 on the remote server.

Thank you very much for your help.



I am trying to configure my report server installed on Server A to point to a reporting services DB on Server B. I am able provide the name and test the connection. However, when i click next on the configuration wizard after providing the Server A name I am receiving the below error:

The feature: "Remote access to report data sources and/or the report server database" is not supported in this edition of Reporting Services

I have SQL Server 2008 R2 DataCenter Edition on both the servers.




<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure