English 中文(简体)
Making sure values are treated as Numeric when SQL Reporting 2008 renders a report as Excel
原标题:

When I save a SQL Report in Excel, a column containing numbers is treated as text in the resulting .xls file. On each row the cell has a green right triangle and a yellow diamond exclamation mark saying "The number in this cell is formatted as text or preceded by an apostrophe."

Can someone explain to me how to make it so the rendered report has no error for this column? My users wish to treat these cells as numeric; i.e. to perform calculations on these values, but they are text.

最佳回答

You can get around this by casting the field within the report.

=CDbl(Fields!mycolumn.Value)

Edit The above example is the work around that I have always used for this issue, however, I just finished reading a post what the user noted that this was not needed, if you used the following code.

=IIF(Fields!FieldName.Value=0,Nothing,Fields!FieldName) 

This seems to fix the issue and allow the use of FormatNumber.

The original post can be found here.

问题回答

暂无回答




相关问题
An error has Occurred During Report proccesing

When I m running the report I m getting that message above. The Report Works fine when I press the "Run Report" Button but I want also to avoid that annoying message that appears when the page loads. ...

Reporting services only displaying the last row

I have built a report pretty basic just a table wiht 45 rows of data. Problem is its only showing one row of data and its the last row. It displays just fine in the dataset and proc. any ...

Show Parameters for Reports In SSRS

I m developing an SSRS in Visual Studio BIDS. In it, I have a link that links to another report (report A). Report A has 4 parameters (dates). When I click on that link, it goes to report A fine, but ...

How to add group, or page field in an existing .rdl report

I have several .rdl reports designed for our client. However, they need new ones, that are relatively similar to the old ones. Differences are in the "group" and "page fields" (these can be changed ...

Report rendering using SSRS in Google Chrome

Hey, In our project, we use SSRS integrated with asp.net forms to render reports. The report looks good in IE. when it comes to google chrome, there re some issues we face such as date picker not ...

热门标签