Different result on local machine and server

Stimulsoft Reports.NET discussion
Post Reply
Alex Horn
Posts: 11
Joined: Mon Jun 12, 2006 3:17 am

Different result on local machine and server

Post by Alex Horn »

Hello!

I dynamically create report from code. On my machine all works fine, but when i upload my project to server all components have invalid sizes. Width and height is increased. I don't change anything in my project when upload it. Any ideas?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Different result on local machine and server

Post by Edward »

Alex wrote:Hello!
I dynamically create report from code. On my machine all works fine, but when i upload my project to server all components have invalid sizes. Width and height is increased. I don't change anything in my project when upload it. Any ideas?
When report is created it get measurement units from environment.
If units on local machine differs from units on server you need set units manually.
Following code sets coordinates and sizes of a report:

Code: Select all

StiReport report = new StiReport();
// set coordinates and sizes of a report to Inches
report.ReportUnit = StiReportUnitType.Inches;
// set coordinates and sizes of a report to Centimeters
report.ReportUnit = StiReportUnitType.Centimeters;

public enum StiReportUnitType
    {
        Centimeters = 0,
        HundredthsOfInch = 1,
        Inches = 2,
        Millimeters = 3,
    }
Thanks.
Post Reply