I have a numeric field that I am calling in from an access backend. If the length of the field is less than 6 digits, I want it padded with 0 at the front => as a leading zero/s.
How do I implement it in crystal report?

eg: 2567
I want it displayed as 002567

If I concatenate it as string the number gets converted with , and .00 formats => 002,567.00

Recommended Answers

All 3 Replies

try using format(variable,"######")

Crystal Report (8.5) on win7/windows 2008 64 bit system
Crystal Report (8.5) is not working on win7/windows 2008 64 bit system

My application is a vb application and I am using Crystal report 8.5. It is working fine on 32 bit system

and 64 bit system of Windows 2003 server. When I run the same application either on win7 64 bit or on 2008

64 bit, report does not open.
I am using vb script to access the database.
Part of the code written in the VB script file is as follows:

`Dim objrsRecordSet                 'As RecordSet
    Dim strSQL                         'As String

    '**** Open Database Connection using the parameters passed from the main program
    Set dbConnection = CreateObject("ADODB.Connection")
    dbConnection.ConnectionString = "Provider=SQLOLEDB;Server=" & mstrServer & ";uid=" & mstrUserName _
                                    & ";pwd=" & mstrPassword & ";Database=" & mstrDatabase & ";"

    dbConnection.CommandTimeout = 200

    dbConnection.Properties("Enable Fastload").Value = True'

When i run my application in debug mode it is working fine on windows 7 also. But when i run the application

through the set up by consuming the dll of crystal report then it is not working, in this case report is not opening.
Guys please help me out with this issue, i will appreciate for your response.

Add a formula field then format the value :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.