How can I specify an integer's total number of digits in VBScript?
===

I have a "text field" in SSRS in Visual Studio 2008 that I would like to convert to a number in order for the export to Excel to work. Simply changing the properties to Number does not work. So I've decided to try to write some code in the Value field for it to work.

I have an invoice number that must always have seven digits, e.g. 1938576, 0000001. Using `CInt(Fields!Invoice.Value)` does not work as it does not keep any leading zeroes. How can I convert this field to a numerical value (integer for this one, but I have a couple other fields that it must work with doubles) while also determining exactly how many digits must be shown? Something like `CInt(Fields!Invoice.Value, 7)` would be great, but I don't think that parameter is part of the function.