Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Format Different in Viewer Than In Designer

Status
Not open for further replies.

demoman

Programmer
Oct 24, 2001
242
US
Environment:

CE 10.0
Citrix/Windows Server 2003
VB6 SP 6
CR Viewer Control 9.0

I have a report created in the designer. One field is a long integer (example: 25200121). I create a formula field to check this value for 0. I print something different if it is zero (0).

JobDisp: IIF({..JobID}=0,"Warehouse",Cstr({..JobID}))

In the designer this displays correctly. I have the number default set to -1234 in the 'Options'). However, when I launch this report from VB6 using the Viewer, it comes out 25,200,121.00.

Questions:

1) Why does the viewer not display exactly what the designer does?
2) Can I force a mask on a numerical field embedded in a string conversion function?

I DO appreciate your feedback! Thanks.

 
This looks like it might be a regional settings issue. Unless you're seeing the different format on the same PC.

-- Jason
"It's Just Ones and Zeros
 
It is on a Citrix server. The report and viewer are both accessed from the same Crystal install.
 
Ah yes....but regional settings are PER user.

I had a similar issue. I ended up setting all regional settings up for myself and then exporting that key of the registry.

I then created a lil batch file the user's could execute to import the settings.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\International]
"iCountry"="1"
"iCurrDigits"="2"
"iCurrency"="0"
"iDate"="0"
"iDigits"="0"
"iLZero"="1"
"iMeasure"="1"
"iNegCurr"="0"
"iTime"="0"
"iTLZero"="0"
"Locale"="00000409"
"s1159"="AM"
"s2359"="PM"
"sCountry"="United States"
"sCurrency"="$"
"sDate"="/"
"sDecimal"="."
"sLanguage"="ENU"
"sList"=","
"sLongDate"="dddd, MMMM dd, yyyy"
"sShortDate"="M/d/yyyy"
"sThousand"=","
"sTime"=":"
"sTimeFormat"="h:mm:ss tt"
"iTimePrefix"="0"
"sMonDecimalSep"="."
"sMonThousandSep"=","
"iNegNumber"="1"
"sNativeDigits"="0123456789"
"NumShape"="1"
"iCalendarType"="1"
"iFirstDayOfWeek"="6"
"iFirstWeekOfYear"="0"
"sGrouping"="0;0"
"sMonGrouping"="3;0"
"sPositiveSign"=""
"sNegativeSign"="-"


-- Jason
"It's Just Ones and Zeros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top