Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Bug or Feature
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug or Feature

 Post Reply Post Reply
Author
Message
barianto View Drop Down
Groupie
Groupie
Avatar

Joined: 01 May 2006
Location: Indonesia
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote barianto Quote  Post ReplyReply Direct Link To This Post Topic: Bug or Feature
    Posted: 05 May 2006 at 5:59am
In Report Control when i added new row with data type double


AddRecord LembagaPenjaminBank, "", 0, 0, Date

Sub AddRecord(Penjamin As LembagaPenjamin, NomorReferensi As String, Nilai As Double, Plafon As Double, JatuhTempo As Date)
    Dim Record As ReportRecord
    Dim Item As ReportRecordItem
    Dim LastIndex As Long
    Set Record = rpcJaminan.Records.Add()
    LastIndex = Record.Index
   
    Set Item = Record.AddItem(Penjamin)
    Set Item = Record.AddItem(NomorReferensi)
    Set Item = Record.AddItem(Nilai)
    'Item.Format = "Rp. %s"
   
    Set Item = Record.AddItem(Plafon)
    Item.Editable = False
    Set Item = Record.AddItem(JatuhTempo)
    rpcJaminan.Populate
    rpcJaminan.Navigator.MoveLastRow
End Sub



it will ignores any character added behind number or turn to zero where first is not number

but when i added request_edit event


Private Sub rpcJaminan_RequestEdit(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem, Cancel As Boolean)
    If Item.Index = COLUMN_NILAI Then
        If Item.Value > 0 Then
         & ;nbs p; Item.Value = Format(Item.Value, "##############.#0")
        Else
         & ;nbs p; Item.Value = Format(Item.Value, "##############")
        End If
    End If
End Sub


it will accept any character in front and behind

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2006 at 2:09pm
See the Value type:
it will ignores any character added behind number or turn to zero where first is not a number.

This is a normal behavior when Value type is 'Long' or 'double'.

Quote
Item.Value = Format(Item.Value, "##############.#0")

This code sets Value type to 'String': which accepts any character.


--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.