Page 1 of 1

Relative path for an image in a report

Posted: Wed Mar 17, 2010 10:55 am
by Patrick8639
Hello,
when adding an image in a report with StimulReport WPF, the absolute path of the image is saved in the report. This generates problems when the designed of the report is not made in the same machine as its use (i.e. when used in a Web server).
What would be nice is the possibility to have relative path for images, where the root path is the path of the .mrt file.
Actually, I can change the path of the image, when editing manually the .mrt file. Unfortunately, the root path is not set to the path of the .mrt file, so it doesn't work correctly.
Patrick

Relative path for an image in a report

Posted: Thu Mar 18, 2010 2:38 am
by Andrew
Hello,

It is not correct to save relative paths. You may, when adding an image, immediately edit the image path. And in the .mrt file that very path will be saved.

Thank you.

Relative path for an image in a report

Posted: Thu Mar 18, 2010 4:36 am
by Patrick8639
Andrew,
as I say in my previous message, it doesn't work, because we have no control about the root path used when compiling the report.
Patrick

Relative path for an image in a report

Posted: Fri Mar 19, 2010 12:58 am
by Jan
Hello Patrick,

May be we don't exactly understand you. Can you say which proeprties you use when specify image?

Thank you.

Relative path for an image in a report

Posted: Sat Mar 20, 2010 10:15 am
by Patrick8639
Jan,
I have an Image where I would like to set the File property to something like "..\Images\MyLogo.wmf", so I can keep all the logo in the same directory, but will have no problem when the report is moved in another folder.
Patrick

Relative path for an image in a report

Posted: Mon Mar 22, 2010 12:31 am
by Jan
Hello Patrick,

We have added new static property - StiOptions.Engine.Image.AbsolutePathOfImages. In this property you can specify absolute path which will be used in combination with path from File property of image component.

Thank you.