Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Format report at runtime Post Reply Post New Topic
Author Message
nabeelpatel
Newbie
Newbie
Avatar

Joined: 28 Nov 2007
Location: Kuwait
Online Status: Offline
Posts: 1
Quote nabeelpatel Replybullet Topic: Format report at runtime
    Posted: 28 Nov 2007 at 5:35am
Dear Brian,
 
SITUATION:
--------------------
I am using xml file as data source for crystal report, we need to represent a part of the data in the following format
 
 
*Bill of Lading                            *Certificate of Origin
*Muncipalty approval                 *Insurance Documents
*Airway Bill
 
Each of these values are represented by a tag i.e are seperate field elements.
 
REQUIREMENT:
--------------------
At times the few of the fields will not have value i.e. for a particular transaction there are no "Bill of lading" and say "Insurance Documents" in that case the data needs to be represented as follows
 
*Certificate of Origin                     *Muncipalty approval    
 *Airway Bill
 
Any idea how we can dynamically adjust the fields so as not to have any blank spaces
            
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 28 Nov 2007 at 9:14am
I would create a formula for each location on the report. Then in the formula test to see which fields have values and assign the proper field to the formula. Somethign like this for the first field
//First field left most column
if {BillOfLading}<>0 Then
    {Bill Of Lading}
Else
    {Certificate Of Origiin};

You'll have to do this for however many possible derivations there could be for each field (i.e. the formula might be a bit more complex). Then, put each line in a separate detail section and use a conditional formula to suppress the detail section if the applicable data has no value.

If you're looking for a lot more info on formulas and how to use them to create advanced formatting, you can check out chapters 5-7 in my new CR Encyclopedia book
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.