简体   繁体   中英

How to connect Crystal Report in VS 2012 to Sql Server 2008?

I searched over the internet but I could not find a solution to my problem. I am trying to use crystal report in my web .NET project using VS 2012. I could not connect to my local Sql server database. I have a CrystalReport.rpt. When I right click on it I get the following options :

在此处输入图片说明

When I click on Database Export I see the following options :

在此处输入图片说明

Then I click make new connection and I get this list :

在此处输入图片说明

I am selecting this option Microsoft OEL BD Provider for SQL Server. Then I am stuck in this screen :

在此处输入图片说明

I tried to put (local) in the server field or My Ip address or '.' indicating local database. But when I try to select the database same from the database drop down list, it is empty?

I would appreciate if someone can tell me what I am doing wrong. Any suggestions is appreciated.

Thanks.

Finally I found a solution to my problem. If you look at this screen some available options was hidden in the question image :

在此处输入图片说明

I selected the SQL Server Native Client 10.0. I have no idea why OLE DB driver was not working. If any one can explain the difference between native client SQL and OLE DB ? That will be great.

Did you also try putting in the ID and Password? Just having the server name isn't enough b/c it will attempt to log you in. After you log in it will generate a list of the available database tables you can choose from. For a server name you can also try .\\sqlexpress

if you're using the free SQL Express version. Or .\\Local might work too.

If that doesn't work, open up SQL Server Management Studio and look at the server name there. It will be the same name for Crystal Reports.

For the server name put in "(local)\\sqlexpress" and check "Integrated Security". Then you should see all the database names.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM