cancel
Showing results for 
Search instead for 
Did you mean: 

removing decimal places, API, type integer

Former Member
0 Kudos

CR9 API. SQL Type INT spits out as AA.aa (w/ 2 decimal places). In the designer this is a no problem. but in the API, without a guide 'tis not.

Does any one know the property(ies) in the API that allow control -- Or can anyone direct me to a resource?

Code below has been executing for years -- but no user ever mentioned the extra decimal places till today. Smirk.

rstQuery("Type")="I" is the softwares tag for knowing its an INT.

N & $ are the other "number" types

thanks for any help.

with oRpt.Sections("D").AddFieldObject ("{ado."&addFieldString&"}", twipsUsed+20, 0)

.Font.Name = "Arial"

.Font.Size = 10

if rstQuery("Type")="D" or rstQuery("Type")="I" or rstQuery("Type")="B" then

.datewindowsdefaulttype=1

.HourType=2

.minuteType=2

.SecondType=2

.AMString=""

.PMString=""

end if

if rstQuery("Type")="N" or rstQuery("Type")="$" then

.HorAlignment = 3

end if

.Height = 300

.Width = maxLength * 120

End With

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok, so sometimes I gotta read things twice. I took a closer look at the "read me", dug through it deeper andI found the FieldObject Object Properties. Yahoooo!

So, rokosz, the answer is .DecimalPlaces get or set.

Answers (1)

Answers (1)

Former Member
0 Kudos

rtfm