cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and run crystal report from a sql database that is on pen drive.

Former Member
0 Kudos

Hi,

I am developing as web based application for my clients. i am creating this application in ASP.NET 4.0, SQL SERVER EXPRESS EDITION 2005 AND CRYSTAL REPORT 13.

The main requirement of the client is that he wanted his database on the portable drive.

I put both SQL DB Files (.mdb and .ldb) on the Pen Drive and successfully run the application from there.

The problem comes with the crystal report. How I connect this Database with Crystal Report and how to run this report from my application?

Kindly resolve my problem ASAP.

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Ajay,

Moved to .NET forums.

CR will NOT connect to the mdf or ldf file, not sure why you say they are MDB, those are Access database files.

Use ODBC or OLE DB, enter in the Server Name, User ID, Password and Database name. Only way CR can connect to SQL Server.

Other issue you may run into is you need to install the CR for VS runtime which is the SDK for CR 2013. CR 2013 does not have any SDK runtime available for app use.

You can get the runtime and VS installer from this page:

First link is to integrate into Visual Studio 2010, 2012 or 2013, other links are the redist packages.

Don

Former Member
0 Kudos

Hi Don,

Thanks for your update on my qyerry.

Yes you are right the files are . mdf or ldf file.

Is there any way we can run reports from a database thats on Pendrive/portable drive.?

Thanks.

0 Kudos

When you install SQL Server it's always running in the Service. If you can't start SQL Server and attach the DB on the pen drive then I don't see any way to connect to it.

All this has to be managed by SQL Server, if you can figure how to attach the MDF on the fly or without using SQL Management Tool then it may work. Check with MS Forums, maybe they know how to.

If you have Management Tools installed then you can attach the MDF, I just don't know what is going to happen when you unplug the drive.

Maybe a batch file to add/remove the DB from the drive may work. Check on MSDN or SLQ help to see how to use a command line to attach MDF.

Crystal assumes the DB is work and Client is installed and configured using typical Client properties. We have no way to do this except possibly, if you can figure what extra properties to use when you connect in CR you can add those properties under the Properties tab in the Connection Wizard.

Good luck

Don

Answers (0)