Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

custom code function " "Textbox1.Paragraphs[0].TextRuns[0]’ contains an error: Input string was not in a correct format"

$
0
0

Complete error below

this function

 Function LongDateFormat(AnyDate As Date) As String

        Dim Suffix As String

        Select Case Day(AnyDate)
            Case 1, 21, 31
                Suffix = "st"
            Case 2, 22
                Suffix = "nd"
            Case 3, 23 = "rd"
            Case Else
                Suffix = "th"
        End Select

        Return Format(AnyDate, "dddd d") & Suffix & Format(AnyDate, " MMMM yyyy")

    End Function

calling in textbox1 expression

= code.LongDateFormat(Globals!ExecutionTime)

Error msg

Warning1[rsRuntimeErrorInExpression] The Value expression for the textrun ‘Textbox1.Paragraphs[0].TextRuns[0]’ contains an error: Input string was not in a correct format.C:\BI-SQL2012dev\ICT\ICT\CustomCodetest.rdl00

[rsRuntimeErrorInExpression] The Value expression for the textrun ‘Textbox1.Paragraphs[0].TextRuns[0]’ contains an error: Input string was not in a correct format.


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>