Dynamically change an image in a Crystal Report at runtime

后端 未结 8 1239
天命终不由人
天命终不由人 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条回答
  •  醉梦人生
    2021-02-04 09:09

    Another option that I've found useful is inserting the pictures you would like to use. Position the graphic accordingly, then right-click the graphic and go to Format Graphic > Common. Check the Suppress box, then click the formula button, shown as x-2. Once in the formula window, simply add the code for determining whether the graphic should be suppressed or not.

    In my case, I was building one invoice template for multiple entities. In the formula window, I simply wrote COMPANY <> 1100 which meant that every time the invoice was run for a company other than 1100, the 1100 graphic would be suppressed.

    Hopefully this makes life easier...

提交回复
热议问题