Crystal Reports  

¦Û­q¨ç¦¡µû¦ô®É¶¡

¤½¦¡¤£·|¡u¨Ì»Ý­n¡v¨ÓÅçºâ©Î©I¥s¡F¤]´N¬O»¡¡A¬Y­Ó¤½¦¡¤£¯à©I¥s¨ä¥L¤½¦¡¨Ó°õ¦æ¤@¨Ç³B²z¡A§Y¨Ï¥Îªº¬O¥þ°ìÅܼơC

¨Ò¦p¡G

Rem Formula PrintSquare
Global x As Number
x = 5
formula = "The square of " & CStr(x,0) & " is " &
ToText ({@square}, 0) & "."

Rem Formula Square
Global x As Number
formula = x * x

¦b³øªí¨Ï¥Î¤½¦¡ PrintSquare ®É¡A±z·|±o¨ì¡G

The square of 5 is 0¡C

¦b¤W­±ªº½d¨Ò¤¤¡A¤½¦¡ PrintSquare ¨Ï¥Îªº¬O¤½¦¡ Square¡A©Ò¥H Crystal Reports ·|±Æ§Ç¨äÅçºâ¡C³o®É·|¥ýÅçºâ²Ä¤@­Ó Square¡AµM«á¤~Åçºâ PrintSquare¡C¦bÅçºâ Square ®É¡A¥þ°ìÅÜ¼Æ x ªº­È¬° 0¡A¦]¬°³o¬O¥¼ªì©l¤Æ Number Åܼƪº­È¡C

¬Û¤Ï¦a¡A¦Û­q¨ç¦¡«h·|¨Ì»Ý­n¨Ó¶i¦æÅçºâ©Î©I¥s¡C¥H¤U¬°¦b«e¤@­Ó½d¨Ò¤¤¨Ï¥Î¦Û­q¨ç¦¡¡G

Rem Formula PrintSquare
formula = "The square of " & CStr (5,0) & " is " &
CStr(cf9Square (5),0) + "."

Rem Custom Function cf9Square
Function cf9Square (x As Number)
cf9Square = x * x
End Function

²{¦b¡A¦pªG±z¦b³øªí¤¤¨Ï¥Î¤½¦¡ PrintSquare¡A«h·|±o¨ì¡G

The square of 5 is 25.

½Ð°Ñ¾\

«Ø¥ß¦Û­q¨ç¦¡ | ¦Û­q¨ç¦¡ ªº Basic »yªk | ¦Û­q¨ç¦¡ ªº Crystal »yªk