2016-05-18 65 views
1

我在RDLC報告中遇到了一個挑戰,要獲取自定義格式的金額。 e.gRDLC中的自定義格式

150 will be shown as 15A 
151 will be like 15B 
152 will be like 15C etc. 

在量的最後一個數字將被替換將A,B,C等From 0 to 9 will be replace with A to J

是否有任何自定義格式提供,或者某些功能,以這樣的格式寫?

回答

0

我不清楚這會適合你,是的,但有一些你的答案的邏輯。

您必須在這裏使用您的自定義邏輯(I think vb code is acceptable)作爲您在c#中的代碼。您定義一個參數並對其進行編碼,然後按照您的要求返回。

http://yuluer.com/page/ddcjfdcd-rdlc-report-in-space.shtml

Custom .ToString() Formats in .rdlc Reports

https://msdn.microsoft.com/en-IN/library/ms252130%28v=vs.90%29.aspx

How to replace a particular string in rdlc?

0

您可以使用此表達式:

=Left(CStr(Fields!YourNumber.Value), CStr(Fields!YourNumber.Value).Length - 1) & 
Choose(Right(CStr(Fields!YourNumber.Value), 1), "A", "B", "C", "D", "E", "F", "G", "H", "I", "J") 

使用Choose function替換您的號碼中的最後一位數字。