Friday, February 24, 2012

export to excel

I'm experiencing an issue where when I export my report to

excel every number in my report exports as something other than a number. Every

number excel field (cell) has a green arrow in the upper left corner which will allow

me to manually convert to a number but this is a major hassle.

I've tried converting the fields in the report using cdbl and cdec but to no

avail.

Anyone have a suggestion on how to fix this?

Thanks

The issue seems to be caused by the formatnumber() function. Doe formatnumber by default change the data's type by default?|||No one else has experienced this issue?|||

The FormatNumber function always returns a String. See this doc page for reference:

http://msdn2.microsoft.com/en-us/library/xfta99yt.aspx

If you want to add number formatting and retain the original numeric data type, you should define the formatting in RDL. Open the properties window for the Textbox and use the Format tab.

-Chris

No comments:

Post a Comment