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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number format

Status
Not open for further replies.

johnugly

Programmer
Jun 21, 2004
31
0
0
BE
Hi,

I use CR 9 to develop my reports, but in my program I use the Crystal Reports for .NET dll's.

I have problems with the representation of numberfields,
for ex : 129 --> 129,00

I set all the options on how they should be formatted, but they keep appearing in "0,00" - format.

This also gives problems if these fields are used in a group --> "Query engine error".

Any suggestion is welcom
Thanks


 
I forgot to say that I use Oracle 9i, before I used SQL-Server and they worked fine. And the oracle-number fields cause the problem
 
I use Crystal extensively with Oracle 9 and have never seen this problem with numbers. Must be something to do with the .NET dlls.

Have you tried creating an Oracle view of the data, you can ensure there are no decimal places by using the Oracle function Round

eg Round ({NumberField},0) if number field = 129.00 it will return 129

There is a similar Crystal function, have you tried using that.

Ian
 
This is common when one uses the wrong database connectivity, something you omitted in your post.

You're likely using the Oracle supplied ODBC driver, which should be relaced by the Crystal supplied Oracle native connectivity, but if you insist upon using the slower ODBC type of connectivity, use the Crystal supplied Oracle ODBC driver, not Oracle's.

-k
 
I use an Oracle ODBC driver for my subreports, they work fine.
For my main reports I use the "Push Model", I create the main reports by using an xml-scheme (ADO.NET), then I fill a Datatable on the Oracle database, and push it to the report, ReportDocument.SetDataSource(datatable).
I just can't figure out why the subreports work fine, and the main rports not.
 
Are the fields definitely numeric?

If so, you might consider converting them to text, trimming them and turning them back into numbers. Something like Tonumber(Left(Totext({your.field}, (Length({your.field})-2)))

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top