找回密码
 立即注册

QQ登录

只需一步,快速开始

3082331066

初级会员

23

主题

68

帖子

241

积分

初级会员

积分
241
3082331066
初级会员   /  发表于:2020-6-24 14:37  /   查看:3115  /  回复:3
在AR13 引用的脚本,AR14以同样方式引用,无法正常显示,有什么解决方法吗?

3 个回复

倒序浏览
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2020-6-30 10:55:08
沙发
您好,你把你写的脚本的方法和,你当前的报表都发过来,我这边根据你的写法进行验证下看看是你的写法有问题,还是其他的原因导致的
回复 使用道具 举报
3082331066
初级会员   /  发表于:2020-7-8 10:04:30
板凳
KearneyKang 发表于 2020-6-30 10:55
您好,你把你写的脚本的方法和,你当前的报表都发过来,我这边根据你的写法进行验证下看看是你的写法有问题 ...

脚本:
Function ConvertToRMB(ByVal inputString As String) As String
        Dim numList As String = "零壹贰叁肆伍陆柒捌玖"
        Dim rmbList As String = "分角元拾佰仟万拾佰仟亿拾佰仟万"
        Dim number As Double = 0
        Dim tempOutString As String = ""
        number = Double.Parse(inputString)


        Dim tempNumberString As String = Convert.ToInt64(number * 100).ToString()
        Dim tempNmberLength As Integer = tempNumberString.Length
        Dim i As Integer = 0

        While i < tempNmberLength  
                Dim oneNumber As Integer = Int32.Parse(tempNumberString.Substring(i, 1))
                Dim oneNumberChar As String = numList.Substring(oneNumber, 1)
                Dim oneNumberUnit As String = rmbList.Substring(tempNmberLength - i - 1, 1)
                If Not (oneNumberChar = "零") Then
                        tempOutString += oneNumberChar + oneNumberUnit
                Else
                        If OrElse OrElse OrElse Then
                                While tempOutString.EndsWith("零")
                                        tempOutString = tempOutString.Substring(0, tempOutString.Length - 1)
                                End While
                        End If
                        If OrElse (oneNumberUnit = "万" AndAlso Not tempOutString.EndsWith("亿")) OrElse Then
                                tempOutString += oneNumberUnit
                        Else
                                If Not tempOutString Is Nothing Then
                                        Dim tempEnd As Boolean = tempOutString.EndsWith("亿")
                                        Dim zeroEnd As Boolean = tempOutString.EndsWith("零")
                                        If tempOutString.Length > 1 Then
                                                Dim zeroStart As Boolean = tempOutString.Substring(tempOutString.Length - 2, 2).StartsWith("零")
                                                If Not zeroEnd AndAlso (zeroStart OrElse Not tempEnd) Then
                                                        tempOutString += oneNumberChar
                                                End If
                                        Else
                                                If Not zeroEnd AndAlso Not tempEnd Then
                                                        tempOutString += oneNumberChar
                                                End If
                                        End If
                                End If

                        End If
                End If
                i += 1

        End While
        If Not tempOutString Is Nothing Then
                While tempOutString.EndsWith("零")
                        tempOutString = tempOutString.Substring(0, tempOutString.Length - 1)
                End While
                While tempOutString.EndsWith("元")
                        tempOutString = tempOutString + "整"
                End While
                Return tempOutString
        Else
                Return ""
        End If
End Function

脚本是原来在论坛上找到的,转换方法也是在论坛上提供的,但是在AR14中脚本就无效了

回复 使用道具 举报
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2020-7-8 10:20:01
地板
你好,是在AR14的桌面端报表设计器无效,还是在Web展示的时候无效,如果是在web展示的时候无效,已经确认这是一个小的bug正在修复中
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部