.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 9th, 2008, 12:07 PM
tam10 tam10 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 31 tam10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 42 m 14 sec
Reputation Power: 4
Angry Crystal Report datasource problems

Hi

I'm really confused about how to create a report in Crystal reports (VS.NET 2005.)

I have all my typed datasets (.xsd) in a project, and the data access layer to fill the datasets in separate project.

In another project (in the same solution) I have the windows forms containing a reports viewer, and in a third project I have my crystal reports.

How can I bind the report to a dataset using my data access layer? Other controls let me bind them to a typed dataset, and then I can programmatically fill the dataset using the DAL, but crystal reports won't let me select anything outside of the current project.

Thanks!

Reply With Quote
  #2  
Old October 9th, 2008, 03:16 PM
LyonHaert's Avatar
LyonHaert LyonHaert is offline
Arcane Scribbler
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Location: Indianapolis, IN
Posts: 1,886 LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 1 m 51 sec
Reputation Power: 557
I think I have a suggestion, but I'll warn you that I won't be able to show you any code. This is mainly because what I did doesn't involve Crystal Reports, but rather the built-in reporting classes in .NET.

I needed to make a program for running reports that had the actual report definitions in their own assemblies, much like yours. These assemblies were plugins, pretty much.

However, because they each might have a different typed dataset and could only reference the application and its libraries and not the other way around, those typed datasets had to be in the same assembly as the report definition. The app and its libraries couldn't know anything specific about the reports. Even the reports that shipped as standard are in a plugin assembly.

When I run the report, the report object from the plugin calls the DAL layer on its own with a lightweight Command object and the typed dataset is filled with the data. The DAL neither knowing the SQL nor the specific type of the typed dataset. It then returns an object containing the report definition, datasource names, datasource objects, etc. for the viewer to incorporate into the LocalReport object in the app and display.

I hope this little description helps. I might also be able to answer more specific questions about the design.
__________________
Joel B Fant
"An element of conflict in any discussion is a very good thing. Shows everybody's taking part, nobody left out. I like that."

.NET Must-Haves
Tools: Reflector
References: Threading in .NET

Reply With Quote
  #3  
Old October 13th, 2008, 04:48 AM
tam10 tam10 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 31 tam10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 42 m 14 sec
Reputation Power: 4
Thanks for your help, I think I understand how you got it to work. I see that the typed datasets do need to be in the same assembly as the reports though, which is annoying because I will have to have duplicate datasets (one for the application) unless I reference the ones in the reports assembly.

Reply With Quote
  #4  
Old October 13th, 2008, 08:58 AM
LyonHaert's Avatar
LyonHaert LyonHaert is offline
Arcane Scribbler
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Location: Indianapolis, IN
Posts: 1,886 LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level)LyonHaert User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 1 m 51 sec
Reputation Power: 557
That's not fun.

Found something for you: link. Check out the last answer; the one about subclassing. Maybe you can have the dataset in your app and reference that assembly with your report assemblies.

Reply With Quote
  #5  
Old October 16th, 2008, 07:01 AM
tam10 tam10 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 31 tam10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 42 m 14 sec
Reputation Power: 4
Quote:
Originally Posted by LyonHaert
That's not fun.

Found something for you: link. Check out the last answer; the one about subclassing. Maybe you can have the dataset in your app and reference that assembly with your report assemblies.

Thanks! That has solved the problem. I can reference my existing datasets from Crystal Reports now.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Crystal Report datasource problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT