たぶん今はもっといい方法があるんでしょうけれども、、とりあえず漢字やら数字やらいろんな入れ方をしているゴチャゴチャデータを半角数字にして
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
Local StringVar target := {xxxxx}; target:=Replace(target,"百","100"); target:=Replace(target,"九十九","99"); target:=Replace(target,"九十八","98"); target:=Replace(target,"九十七","97"); target:=Replace(target,"九十六","96"); target:=Replace(target,"九十五","95"); target:=Replace(target,"九十四","94"); target:=Replace(target,"九十三","93"); target:=Replace(target,"九十二","92"); target:=Replace(target,"九十一","91"); target:=Replace(target,"九十","90"); target:=Replace(target,"八十九","89"); target:=Replace(target,"八十八","88"); target:=Replace(target,"八十七","87"); target:=Replace(target,"八十六","86"); target:=Replace(target,"八十五","85"); target:=Replace(target,"八十四","84"); target:=Replace(target,"八十三","83"); target:=Replace(target,"八十二","82"); target:=Replace(target,"八十一","81"); target:=Replace(target,"八十","80"); target:=Replace(target,"七十九","79"); target:=Replace(target,"七十八","78"); target:=Replace(target,"七十七","77"); target:=Replace(target,"七十六","76"); target:=Replace(target,"七十五","75"); target:=Replace(target,"七十四","74"); target:=Replace(target,"七十三","73"); target:=Replace(target,"七十二","72"); target:=Replace(target,"七十一","71"); target:=Replace(target,"七十","70"); target:=Replace(target,"六十九","69"); target:=Replace(target,"六十八","68"); target:=Replace(target,"六十七","67"); target:=Replace(target,"六十六","66"); target:=Replace(target,"六十五","65"); target:=Replace(target,"六十四","64"); target:=Replace(target,"六十三","63"); target:=Replace(target,"六十二","62"); target:=Replace(target,"六十一","61"); target:=Replace(target,"六十","60"); target:=Replace(target,"五十九","59"); target:=Replace(target,"五十八","58"); target:=Replace(target,"五十七","57"); target:=Replace(target,"五十六","56"); target:=Replace(target,"五十五","55"); target:=Replace(target,"五十四","54"); target:=Replace(target,"五十三","53"); target:=Replace(target,"五十二","52"); target:=Replace(target,"五十一","51"); target:=Replace(target,"五十","50"); target:=Replace(target,"四十九","49"); target:=Replace(target,"四十八","48"); target:=Replace(target,"四十七","47"); target:=Replace(target,"四十六","46"); target:=Replace(target,"四十五","45"); target:=Replace(target,"四十四","44"); target:=Replace(target,"四十三","43"); target:=Replace(target,"四十二","42"); target:=Replace(target,"四十一","41"); target:=Replace(target,"四十","40"); target:=Replace(target,"三十九","39"); target:=Replace(target,"三十八","38"); target:=Replace(target,"三十七","37"); target:=Replace(target,"三十六","36"); target:=Replace(target,"三十五","35"); target:=Replace(target,"三十四","34"); target:=Replace(target,"三十三","33"); target:=Replace(target,"三十二","32"); target:=Replace(target,"三十一","31"); target:=Replace(target,"三十","30"); target:=Replace(target,"二十九","29"); target:=Replace(target,"二十八","28"); target:=Replace(target,"二十七","27"); target:=Replace(target,"二十六","26"); target:=Replace(target,"二十五","25"); target:=Replace(target,"二十四","24"); target:=Replace(target,"二十三","23"); target:=Replace(target,"二十二","22"); target:=Replace(target,"二十一","21"); target:=Replace(target,"二十","20"); target:=Replace(target,"十九","19"); target:=Replace(target,"十八","18"); target:=Replace(target,"十七","17"); target:=Replace(target,"十六","16"); target:=Replace(target,"十五","15"); target:=Replace(target,"十四","14"); target:=Replace(target,"十三","13"); target:=Replace(target,"十二","12"); target:=Replace(target,"十一","11"); target:=Replace(target,"十","10"); target:=Replace(target,"九","9"); target:=Replace(target,"八","8"); target:=Replace(target,"七","7"); target:=Replace(target,"六","6"); target:=Replace(target,"五","5"); target:=Replace(target,"四","4"); target:=Replace(target,"三","3"); target:=Replace(target,"二","2"); target:=Replace(target,"一","1"); target := Replace(target,"1st","1"); target := Replace(target,"3th","3"); target := Replace(target,"7th","7"); target := Replace(target,"13th","13"); target := Replace(target,"17th","17"); target := Replace(target,"23th","23"); target := Replace(target,"25th","25"); target := Replace(target,"27th","27"); target := Replace(target,"33th","33"); target := Replace(target,"37th","37"); target := Replace(target,"43th","43"); target := Replace(target,"47th","47"); target := Replace(target,"50th","50"); target := Replace(target,"60th","60"); target := Replace(target,"100th","100"); target := Replace(target,"150th","150"); target := Replace(target,"200th","200"); target := Replace(target,"250th","250"); target := Replace(target,"300th","300"); target := Replace(target,"350th","350"); target := Replace(target, "1","1"); target := Replace(target, "2","2"); target := Replace(target, "3","3"); target := Replace(target, "4","4"); target := Replace(target, "5","5"); target := Replace(target, "6","6"); target := Replace(target, "7","7"); target := Replace(target, "8","8"); target := Replace(target, "9","9"); target := Replace(target, "0","0"); |
で、1つ式を作っといてから(式名:@席数半角数字)
1 2 |
Local StringVar target := {@席数半角数字}; if IsNumeric({@席数半角数字})=true then ccur({@席数半角数字}) |
さらに式を作る、、、、
相変わらずチカワワザですなあ、、、
元データはさわらずに、VisualStudioも開かずに、CrystalReportsだけでなんとかしのぐ。現場での苦肉の策であります。
コメント