Search code examples
excelreporting-servicesssrs-2008

Report with padded zeros cell shows as #VALUE! in Excel


I have a cell in a table that has its value set to an integer.

The Format of the cell is set to 000 which results in said integer being zero padded when displayed in the report viewer or other export formats (like PDF)

However, when I export this report to Excel, the value shown in the cells is #VALUE!.

How can i have the value show as padded zeroes in Excel?

I'd like to know if this can be done natively in SSRS design without embedded (.net) code or changing the SQL query.


Solution

  • This can fix it;

    =Right("000" & Fields!MyInt.Value.ToString, 3);