Solved

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

Posted on 2003-11-16
4
1,785 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
  • 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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