Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
What is this page about?
This page describes inserting images dynamically.
You can insert images to your reports dynamically using image tags. To declare a dynamically inserted image within your template, do the following steps:
image tag within the textbox using the following syntax.<<image [image_expression]>>
The expression declared within an image tag is used by the engine to build an image to be inserted. The expression must return a value of one of the following types:
While building a report, the following procedure is applied to an image tag:
Note – If the expression declared within an image tag returns a stream object, then it is closed by the engine as soon as the corresponding image is built.
By default, the engine stretches an image filling a textbox to the size of the textbox without preserving the ratio of the image. However, you can change this behavior in the following ways:
keepRatio switch as follows.
<<image [image_expression] -keepRatio>>
fitHeight switch as follows.
<<image [image_expression] -fitHeight>>
fitWidth switch as follows.
<<image [image_expression] -fitWidth>>
fitSize switch as follows.
<<image [image_expression] -fitSize>>
fitSizeLim switch as follows.
<<image [image_expression] -fitSizeLim>>
Note – If the size of the image is greater than the size of the textbox, then the fitSizeLim switch acts like fitHeight or fitWidth. Otherwise, the fitSizeLim switch acts like fitSize.
Q: What data types can be returned by the image expression?
A: The expression may return a byte[] containing raw image bytes, a System.IO.Stream that can read the image data, a System.Drawing.Image object, or a string that holds an image URI, a file path, or a Base64‑encoded image.
Q: How does the engine treat a Stream returned from the image expression?
A: After the image is built, the engine automatically closes the Stream. You do not need to close it manually, and you should not use the stream after the tag is processed.
Q: Which switch should I use to keep the original aspect ratio of the image?
A: Use the -keepRatio switch. It stretches the image to fill the textbox while preserving its width‑to‑height ratio.
Q: How can I make the textbox automatically resize to match the image dimensions?
A: Apply the -fitSize switch. The engine will adjust the textbox size so that it exactly matches the size of the inserted image.
Q: What does the -fitSizeLim switch do, and when should I use it?
A: -fitSizeLim resizes the textbox to the image size but never makes the textbox larger than its original dimensions. If the image is larger, the switch behaves like -fitHeight or -fitWidth; otherwise, it behaves like -fitSize. Use it when you want to limit the textbox growth while still fitting the image proportionally.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.