[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1867
  • Last Modified:

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

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
jtdagger
Asked:
jtdagger
  • 2
  • 2
1 Solution
 
EwaldLCommented:
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
 
jtdaggerAuthor Commented:
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
 
EwaldLCommented:
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
 
jtdaggerAuthor Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now