Page 1 of 1

How to Convert size of BitmapImage from pixel to ReportUnit

Posted: Fri Jul 29, 2011 8:16 pm
by Hoang Nguyen
Hi,
I want to add a StiImage Component by code to my report template and the size of StiImage Component must fit to size of BitmapImage. But I can't find any way to convert size of BitmapImage from pixel to ReportUnit(ect: Centimet....)
Please help me!

How to Convert size of BitmapImage from pixel to ReportUnit

Posted: Mon Aug 01, 2011 7:52 am
by Alex K.
Hello,

Please check the following code:

Code: Select all

StiReport report = new StiReport();
report.Unit.ConvertToHInches
Thank you.

How to Convert size of BitmapImage from pixel to ReportUnit

Posted: Thu Aug 11, 2011 2:46 am
by Hoang Nguyen
Hi, thank you
I used the following code:

Code: Select all

StiReport report = new StiReport();
report.Unit.ConvertFromHInches(image.Width);
It work fine.

How to Convert size of BitmapImage from pixel to ReportUnit

Posted: Thu Aug 11, 2011 6:54 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.