Print Page | Close Window

Bug or Feature

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4141
Printed Date: 30 April 2025 at 7:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug or Feature
Posted By: barianto
Subject: Bug or Feature
Date 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




Replies:
Posted By: sserge
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net