Print Page | Close Window

Connect to database

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=121
Printed Date: 05 May 2024 at 9:41pm


Topic: Connect to database
Posted By: ganesh
Subject: Connect to database
Date Posted: 11 Jan 2007 at 8:18pm
hi
 i m facing a problem in crystal report. actually i have a user list and each user has their own database. database schema is same, but data will be different.now i want to display report on user's database. means user 1 is logged on same report will connect to 1 's database and generate report.if user2 logged on than same report display record from 2' database. this user list can be increased. its not prefixed. so i want to make crystal report's connection dynamic. so on the basis user's login it will connect to their database.


-------------
gsg



Replies:
Posted By: BrianBischof
Date Posted: 12 Jan 2007 at 12:31am
Are you familiar with programming .NET? You are going to have to change the connection properties of the ReportDocument object using the DatabaseName property.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: ganesh
Date Posted: 19 Jan 2007 at 8:52pm

i m again repeating that  i want all these functionality  in crystal only. i m not using these report with any application. these report will run independently.

pls if u have any idea abt this thing send me. thank u



-------------
gsg


Posted By: BrianBischof
Date Posted: 19 Jan 2007 at 10:36pm
Unfortunately, it can't be done using Crystal Reports only.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: ChrisM
Date Posted: 10 Dec 2007 at 5:52am
Originally posted by ganesh

hi
actually i have a user list and each user has their own database. database schema is same, but data will be different.
 
I'm sure there's a perfectly sane reason for doing this...but wouldn't it be easier (and somewhat more conventional) to have one db, with column 'IDuser' in each table? Yes of course it would, you've just established that.
It can only get worse: the company does rather well - 5 users becomes 50 - then you have to make some schema changes...


-------------
Beer will get you through times of no money better than money will get you through times of no beer.


Posted By: Lugh
Date Posted: 14 Dec 2007 at 6:27am
Originally posted by ChrisM

I'm sure there's a perfectly sane reason for doing this...but wouldn't it be easier (and somewhat more conventional) to have one db, with column 'IDuser' in each table? Yes of course it would, you've just established that.
It can only get worse: the company does rather well - 5 users becomes 50 - then you have to make some schema changes...


In all fairness, he may not strictly be talking about entire separate databases for each user.  He may be talking about user-owned tables in a single database.  This is a methodology that does have some distinct advantages.  But, again, Crystal does not deal well with changing anything about the connection on the fly.



Print Page | Close Window