Friday, 20 May 2016

SSRS 2005 Bug - Percentage calculated column when Exporting to Excel

Nature of the Issue Faced :- Say you have 3 columns in a tablix/table on the report. There are 3 textboxes in each of these columns. Let us give them names as textbox1, textbox2 and textbox3.
Textbox3 should be textbox1 - textbox2. We are using following formula to achieve this :-

textbox3.Value = ReportItems!textbox1.Value -  ReportItems!textbox2.Value

textbox1 and textbox2 have decimal values rounded off to 3 decimal places (e.g.12.412). On the report we had set the format of the cell to be 'P1' (eg 12.4)

Now that we know the scenario, here is what the issue is - Everything works fine inside the cell of the report, however as soon as to export to excel the place where you have expression shows some arbitrary value like _385 -  _386



textbox1 has value of 76.0% and textbox2 has value of 74.1% in the above example!


Solution :- Changing the formula to Round(ReportItems!textbox1.Value,3) -  Round(ReportItems!textbox2.Value,3) rectified the issue. Cannot quite comprehend how it worked. Tried in SSRS 2008 and it worked fine!

I'll open this question to all of you who are reading this!

Thanks

1 comment:

  1. Thanks for sharing with us that awesome article you have amazing blog. MSBI Online Training

    ReplyDelete

SSIS Issues : A Day of Learning

Seldom are the days when you run into complex issues but resolve them in the shortest interval of time. Thanks to Larry Page and my fello...