简体   繁体   中英

How to format a number in SSRS Report for Matrix?

I am formatting a number which is Date and I want to display only day and month part (eg Jan 1, Jan 2, Jan 3, Jan 4…) of this but it is not formatting and displaying the complete date.

Whereas If I use the same wizard with tabular then it is working fine.

I am using wizard to format data 在此输入图像描述

Is there any other way to format data while working with matrix ?

Try right clicking on the field in your SSRS report and using an expression for it instead.

在此输入图像描述

In the altanative, you could use datename function in sql server for that Column

SELECT DATENAME(DAY,Col_Name)+', '+LEFT(DATENAME(MONTH,Col_Name),3) that is SELECT DATENAME(DAY,'2016-03-21')+', '+LEFT(DATENAME(MONTH,'2016-03-21'),3)

I think the best way to format dates outside that wizard is the format property. Click on the textbox and look in the Properties window for the Format property. Enter "MMM dd" into that field.

Alternatively, you can use a texbox formula as GabrielVA noted. I would recommend trying

=Format(Fields!Date.Value, "MMM dd")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM