Dynamically change an image in a Crystal Report at runtime

后端 未结 8 1253
天命终不由人
天命终不由人 2021-02-04 08:08

I\'m using the Crystal Reports included with VisualStudio 2005. I would like to change the image that is displayed on the report at runtime ideally by building a path to the ima

8条回答
  •  梦毁少年i
    2021-02-04 09:03

    The current version of Crystal Reports (for Visual Studio 2012+) that I use with Visual Studio 2015 supports this function. Follow the following steps:

    1. Insert a picture into your report. This will serve as your placeholder.'
    2. Right click your picture and choose Format Object
    3. Select the Picture tab and the press the formula button
    4. A formula window will open. Enter a formula that will find your pictures as links.

      if({@isDonor}="1") then "http://www.ny.org/images/aaf/picture1.jpg" else "http://www.ny.org/images/aaf/picture2.jpg" And you're done!

提交回复
热议问题