Topic: Cannot See Data Source Object in Database Expert Posted: 29 May 2007 at 8:23pm
Hi all,
Forgive me if my post is too long. (this is my first post)
I have a problem using Data Source Objects as .NET objects in other projects under Visual Studio 2005.
Assuming all required classes are compiled as DLL and imported into projects successfully.
I have a Project called Bank.UC. Inside this project, it contains many classes like Account, Employees, etc. This class is linked to Bank.DC, that deals with connecting to SQL Server 2005 database to fetch the data. All the data is filled into DataSet and returned as DataSet. (Assuming no errors when connecting the database and retrieving the required data.) When it comes back to Bank.UC, the objects would get its data from DC and return as class objects.
Then I created another project called Reports and added Bank.UC into Data Source. I was able to see the Bank.UC and its classes and variables associated with classes. For example:
Bank.UC (Class Library) -> Account (Class name created in Bank.UC) -> Name (variable) -> AccountNo (variable) -> Value (variable)
However, I was not able to drag the variables into my created Crystal Report. The Bank.UC object is also not visible under .NET Objects in Database Expert under Field Explorer. The project to view the Crystal Report is of Windows Application.
I also do not want Crystal Report to prompt for login particulars as all database connection information and login information is stored in App.config.
Any solutions to this problem is greatly appreciated.
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Posted: 30 May 2007 at 4:49pm
This is because Bank.UC is an object. Crystal is expecting a DataSource. So, you would probably need to link to Bank.DC. Another option might be to serialize your Bank.UC object and report off of the XML - I haven't done this, so I don't know for sure if it will get you what you need.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum