views:

713

answers:

5

I'm newly getting into creating and programming reports using SQL Server Reporting Services.

One thing that bugs me right off the bat: I can't seem to find an easy way to tell the BIDS (Business Intelligence Dev Studio, a.k.a. Visual Studio) to use the metric system for measurements - you know - millimeters, centimeters etc., instead of inches and so on.

I was trying to figure out whether that's a setting inside Visual Studio (and if so: where is it??), or whether this depends on the Reporting services instance we're going against (and again: if so, where the heck can I change that???).

There must be a way to change this!! Except for the US, no one in the world is still measuring in inches..... c'mon - the world at large has long since adopted the metric system! Don't tell me Microsoft makes me go back into the dark ages.....

+1  A: 

Using BIDS 2005 (I haven't used the 2008 version), you can define measurements in any unit that the designer understands - it's acceptable within the same report to define some measurements in inches, some in centimeters, some in pixels etc.

If you look at the report definition stored in the RDL file (as XML), you'll see that the value is stored in the units you provide (rather than being converted to imperial measurements under the hood) - as in this example:

  <InteractiveWidth>8.5in</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>

If the values in inches in the default report template bother you, you can change them - in SQL 2005, the template is stored by default at

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject\Report.rdl

This location may be slightly different for SQL 2008.

(Note that this doesn't amend the reports produced by the report wizard.)

Ed Harper
Thanks! I knew I could define them in any format - but BIDS 2008 still always falls back to inches by default in any new report :-( I'll try your suggestion back at the office tomorrow and I'll let you know!
marc_s
A: 

I found the solution myself - sort of.

When a new report is created, I can right-click on the report design surface and choose "Report Properties". In there, I can pick between inches and centimeters for my measurements.

But I still haven't found a way to tell Reporting Services that I always want the metric system by default...... any further tips would be welcome!

marc_s
+2  A: 

For SSRS 2008, edit the Report.rdl template at

<Visual_Studio_Install_dir>\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

and add the following line before the closing </Report> tag:

<rd:ReportUnitType>Cm</rd:ReportUnitType>

This will default all new reports (created by Add New Item -> select Report) to use centimetres. However, as Ed noted, reports created by the Report Wizard seem to be hard-coded to use inches.

Something else to note is that whatever you place in that Report.rdl file will be used when creating a new report, so you can setup default page sizes, fonts, etc...

Ian Kemp
Also suggest that Ed's or my answer be marked as the answer to this question.
Ian Kemp
Actually, sorry - you're right - half the time :-) When using "Add New Item -> Report", it works; when you do "Add New Report" and then step through the wizard, it doesn't :-( Any idea how to "defaultify" the wizard, too?
marc_s
A: 

you can use also <rd:ReportUnitType>Point</rd:ReportUnitType> for pixels

Sunlight
A: 
you can use also <rd:ReportUnitType>Point</rd:ReportUnitType> for pixels

Actually, you need to use "Pixels" if you want pixels. Points are a unit of measurement from the world of printing - one point is 1/72 inch (i.e.: there are 72 Points in 1 inch).

AlwaysLearning