Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report Format issue with NULL values Post Reply Post New Topic
Author Message
Ashok
Newbie
Newbie


Joined: 23 Jul 2008
Online Status: Offline
Posts: 16
Quote Ashok Replybullet Topic: Report Format issue with NULL values
     Posted: 11 May 2009 at 11:02am

QuestionUrgent,

I created a CR  through a SQL Command. I have a problem while export the results into EXCEL. Let’s assume I have 3 fields A,B,C.

When the report export If A,B,C has values the format is showing correctly.

If A has the value, B don’t have value, C has value – in this case the value of C is showing under B column(formatting issue).

Could you please advice how to handle this.

 

I tried in SQL by putting

CASE WHEN <filed1> IS NULL THEN ' ' ELSE TO_CHAR(field1) END as field1,

I’m getting formatting with this.

 

I also tried as:

---------------

CASE WHEN <filed1> IS NULL THEN '.' ELSE TO_CHAR(field1) END as field1,

This is working correctly but it will show ‘.’ On the report if the value of the fields is null. But I don’t want to show any ‘.’.

 

Please advice,Thanks

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 May 2009 at 6:54am
have you tried setting the properties of the report to change nulls to the default?  The export routine to Excel is not what I would expect, though from the IDE it is much more robust, you can try setting constant column width, since I had issues with data shifting columns based on the width, which made no sense to me.
 
HTH
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