Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now