Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: column with alias is not displayed in fields secti Post Reply Post New Topic
Author Message
brainsoup
Newbie
Newbie
Avatar

Joined: 30 Jul 2009
Location: India
Online Status: Offline
Posts: 17
Quote brainsoup Replybullet Topic: column with alias is not displayed in fields secti
     Posted: 03 Aug 2009 at 11:50pm
Hi,
I am using a stored procedure to select records for my crystal report. The data base used is sql server. My query inside the stored procedure goes like this
 
SELECT col1, col2, CASE WHEN (col3='S') THEN 'SUCCESS'
                                       WHEN (col3='F') THEN 'FAILURE'
                                       WHEN (col3='N') THEN 'NO RESULT'
                                       ELSE NULL
                                       AS STATUS
FROM TABLE1 WHERE  <my conditions ...>
 
The fields col1 and col2 is getting displayed when i select the stored procedure as the data source. But the 'STATUS' field is not getting displayed.
 
Please suggest what is going wrong.
 
PS: In my actual query, the case statement is having around 10 conditions. Hence I am preferring to keep the case in the SP itself rather than doing it in the crystal report
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 04 Aug 2009 at 6:18am
I can't think of anything.  Has this always been the case?  If not, you might try a verify database and see if that works (it should).  The next thing that I would try is to change the name of the alias, and see if that helps.  If you have multiple databases, I would also check that your ODBC connection is pointing to the correct database.  I don't know how many times I have changed something in one database, only to find that my report is looking in another.
 
I am all for doing just about everything on the DB server, which is probably a 'faster' machine, and the software is optimized to handle the data as  group.  Let the DB software do what it is best at, and let Crystal handle the formatting (what it's best at).
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum