Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Keep up the good work - excellent site - i'd been looking for something like this for ages !..."

Geography

Where in the world do Tek-Tips members come from?
tek1ket (MIS)
5 May 12 8:07
I have a Solution with n Projects, in one of the Projects(Layer1) all of the Object collection are located , in the other Project I have the Reports and viewers, i can access the Object COllection as datasrource in Layer1 in all forms but when i want to set the datasource for the Crystal reports i cannot see those object Collection. I can see just the Object Collection which are located in the same Project.
is it possible to access the Object Collection in other projects of the same Solution for the Crystal report.

Solution
   1)Project1
      a)Object Collection1
   2)Project2
      a)ObjectCollection2
      b)Form
      C)CrystalReport

Form can access "Object Collection1" and "Object Collection2"
CrystalReport can access  just "Object Collection2" when i click the "Database Expert-->Project Data -->.NET Objects"

I need to access "Object Collection1" in Database Expert of Crytsal Report

Thank you
hilfy ( IS/IT--Management)
7 May 12 17:07
The Crystal components can't see "outside" of the project where they're located.  However, I have some thoughts about how you might be able to get this to work....

What I would do if I were writing this would be to have the project (Project1) that contains the object collection definition compile into an assembly.  I would then reference that assembly in the project where my forms and reports are located (Project2) and added to the Using clauses for any forms where it is used.  Any object collection that is used would actually be instantiated in Project2 where it would be available for Crystal to "see" for the reports.  

The challenge with this approach is that if the same object collection instance is used in multiple forms (for example in both a data entry form and a report viewer form that is called from the data entry form) the instance will have to be passed between the forms.  While I haven't done this with object collections, I have done it with DataSets.  Using the example I mentioned, I would override the constructor on the report viewer form so that I can pass the object collection instance into the form and assign it to the report's DataSource.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close