Solved

Setting a dynamic OLE object path (Visual Studio .Net)

Posted on 2003-11-16
4
1,797 Views
Last Modified: 2006-11-17
I am using Crystal Reports for Visual Studio .Net and I would like to dynamically set the path to an OLE object at runtime.  I have seen examples of this with VB, using the 'LoadPicture' function, but I'm not sure how to accomplish this in Visual Studio.

Is there a way to access events for a report using C#?  I know how to use events for the ReportViewer object, but I don't think that gives me access to a specific report's properties.  

I appreciate the help as I am new to Crystal.

Jon
0
Comment
Question by:jtdagger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
EwaldL earned 250 total points
ID: 9766260
the cr assemblies in .net have no section events. so you could
a) either use the rdc in .net. There is a white paper on this, but i dont like that approach as the rdc is not scalable. if you are interested in though this check this out
http://support.crystaldecisions.com/communityCS/TechnicalPapers/crnet_rdc.pdf.asp
and you should be able to write an application based on the samples you have seen already
b) or use datasets. Read out the relevant records wtih the image path from the database in dataset A. Then fill dataset B with the releavant images (of blob type?). Now pass that dataset to the report. Here is some general info on datasets + crystal
http://support.crystaldecisions.com/communityCS/TechnicalPapers/rtm_ReportingOffADONETDataSets.pdf.asp

0
 

Author Comment

by:jtdagger
ID: 9766625
I like the idea of passing in a dataset with the objects I need, but I'm not exactly sure how to manage the blob types.  Here's some more detail on how I am using the reports.

Each report is based on a dataset with one record in it.  Each report will also contain 2 OLE objects (1 bitmap and 1 excel file)...I guess I could add 2 fields to the dataset passed into the report and put the objects in those.

Do you know of any info explaining 1) storing OLE objects in a dataset and 2) displaying the contents in a report?
0
 
LVL 13

Expert Comment

by:EwaldL
ID: 9766706
sorry, got to pass on the database side. but once you have a dataset filled, this should explain the rest
http://support.crystaldecisions.com/communityCS/TechnicalPapers/rtm_ReportingOffADONETDataSets.pdf.asp
0
 

Author Comment

by:jtdagger
ID: 9769053
Thanks.  This seems to work fine if I manually insert the OLE object into the database table, but I can't figure out how to insert the object in code.  Oh well, this isn't really the right area for that kind of question...thans again for your help.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question