Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts

Wednesday, March 28, 2012

Numbers and Crystal Reports 9

I exported a column of type float to SQL Server using DTS. In Crystal
reports, it 'sees' the column as a string! Is 'float' the best type to
use? Must I create a formula field in CR to 'correct' for this?Hi

From the database side you should choose the most appropriate datatype for
the data which it will hold, at a guess decimal might be more appropriate.

Its been a while since I used Crystal so I can't remember how it determined
the datatypes, but I seem to remember that you mask the output to be in the
format that you require.

John

"chrispycrunch" <chrispycrunch@.gmail.com> wrote in message
news:1107712517.428328.79850@.o13g2000cwo.googlegro ups.com...
>I exported a column of type float to SQL Server using DTS. In Crystal
> reports, it 'sees' the column as a string! Is 'float' the best type to
> use? Must I create a formula field in CR to 'correct' for this?|||chrispycrunch (chrispycrunch@.gmail.com) writes:
> I exported a column of type float to SQL Server using DTS. In Crystal
> reports, it 'sees' the column as a string! Is 'float' the best type to
> use? Must I create a formula field in CR to 'correct' for this?

So if you sp_help on the table in Query Analyzer, it is reported to be
a float?

If so, you should probably ask in a forum devoted to Crystal Reports. We
use Crystal in our shop, but I don't have it installed on my machine...

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:4206972c$0$7707$fa0fcedb@.news.zen.co.uk...
> Hi
> From the database side you should choose the most appropriate datatype for
> the data which it will hold, at a guess decimal might be more appropriate.
> Its been a while since I used Crystal so I can't remember how it
> determined the datatypes, but I seem to remember that you mask the output
> to be in the format that you require.
> John
> "chrispycrunch" <chrispycrunch@.gmail.com> wrote in message
> news:1107712517.428328.79850@.o13g2000cwo.googlegro ups.com...
>>I exported a column of type float to SQL Server using DTS. In Crystal
>> reports, it 'sees' the column as a string! Is 'float' the best type to
>> use? Must I create a formula field in CR to 'correct' for this?
>
I would imagine decimal is probably more appropriate than float.

I usually base my crystal reports on stored procedures rather than directly
on tables.
I can then do any "work" necessary to make the crystal report easier to put
together in the stored procedure which I, quite frankly, find a lot easier
to work with than the crystal alternatives.
I'd do any maths I could in the stored procedure as well.
If float is best for storage and decimal for presentation then you could
cast the field in your stored procedure's select statement.

If these are no good for you then, is it just a presentation thing?
You can specify a formula for display format of a field in crystal.

HTH
--
Regards,
Andy O'Neill

Monday, March 19, 2012

number formats

Hi

I'm using Crystal Reports for Visual Studio 2005. I'm having problems with displaying numbers in the correct format.

I've gone into Design > Default Settings menu and set the format of number fields to no decimal place (i.e. 1 instead of 1.0) and taken out the thousand separator. But this doesn't seem to have made a difference.

On one report, the numbers show ok (e.g. 54) on the report preview but when I run it through my application, the numbers are showing with decimal places (e.g. 54.00).

On another report, the ids of the records shown in the report appear in the group tree and have thousand separators on them when run through my application. As with the other report, they appear correctly in the report preview!

How can I make the format show correctly when running the report through my application?

ThanksFor anyone that's interested, I got the answer elsewhere. the formula to use is ToText({fieldname},0,"")

Saturday, February 25, 2012

null user login failed

I'm new to Crystal Reports and ASP and I'm sure i'm missing something simple here.

I've got a SQL server database, A Crystal Report, a VB application and an ASP Application

In the VB app i call the crystal report and log on to the database with the intergrated security

However in the ASP app i try the same and it has me log on as a null user.

what have i forgotten to do that will let the intergrated security work between SQL Server and ASPyou need to use impersonation in IIS so that IIS uses the credentials of the user, rather than of the nt account the IIS service is running as.|||Thank you i knew it was something simple i was missing

Null Reference Exception

I cannot seem to get the crystal reports to work in asp.net

I set the databindings source property and the report shows in the designer a little weird. In the Initialize component, i call the BindData() and when i run the app i get a NullReferenceException.

I did exactly what a walkthrough from msdn said to do and its not working.

I also tried setting a breakpoint on InitializeComponent to see what was happening, but it errors before it gets called.

Any suggestions about this NullReferenceExceptionStill need help on this one