Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to programmatically break links for Crystal Reports?
    text
    copied!<p>All our Crystal reports have an image (e.g. company logo). Some of these images are hard linked to a file on the local machine e.g. C:\Images\ReportLogo.bmp. I can access these links from the Crystal Reports Designer by clicking Edit > Links. On this pop up form there is a button labeled <strong>Break Link</strong>. How do I programmatically break the links instead of manually opening every report file and clicking the button? We have 100+ reports so I'd prefer not to go the manual route. </p> <p>This is what I have so far (we use this to set the width/height of the same picture object I'm trying to break the link for:</p> <pre><code>Imports RAS = CrystalDecisions.ReportAppServer Dim cdwReport as RAS.ReportClientDocumentWrapper Dim crcObjects As RAS.ReportDefModel.ReportObjects = cdwReport.ReportDefController.ReportObjectController.GetAllReportObjects Dim crcPictureObject As CrystalDecisions.ReportAppServer.ReportDefModel.PictureObject For Each crcObject As RAS.ReportDefModel.ReportObject2 In crcObjects If crcObject.Kind = CrystalDecisions.ReportAppServer.ReportDefModel.CrReportObjectKindEnum.crReportObjectKindPicture Then crcPictureObject = crcObject With crcPictureObject .OriginalHeight = PicHeight .OriginalWidth = PicWidth 'Break link here End With End If </code></pre> <p><code>crcPictureObject.LinkedURI</code> is Nothing.</p> <p>Not 100% sure whether this is the appropriate route to take to break all the links. The code above loops through all the reports in a folder.</p> <p>Is there an "easy" way of doing this? (either VB.net/C# will be fine)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload