Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavendra_hullur
Active Contributor

Crystal Report Version:

2008

Scenario:
Suppose there are 2 fields "Head Account Number" and "Sub Account Number" in a section with headers and lines used for the headers as underlines (Please refer the embedded image).
Requirement is that, we need to suppress the header and respective field for field "Head Account Number" when there is no data for the same.
Also, we need to move the field "Sub Account Number" header and respective field value to field "Head Account Number" position.
Here, we can easily suppress field "Head Account Number" header and respective field by using field level suppress condition and also we can move field "Sub Account Number" header and respective field to field "Head Account Number" Position using dynamic X position values under "Size and Position".
But for line we don't have dynamic X position option, so the line cannot be moved or suppressed.


Solution:
The line for field "Sub Account Number", which needs to be suppressed (Field "Sub Account Number" Header and respective field moved to field "Head Account Number" position and the line which was used for field "Head Account Number", will serve the purpose for field "Sub Account Number") can be hidden using a text field without any text and with same width. with height as much minimum as possible to cover the line used for field "Sub Account Number".

The suppress condition for the text field used to cover the line needs to be in such a way that, the text field needs to be suppressed when both fields have data else needs to be displayed.

Also to be noted is that, the background color under "Border" tab for text field(which is used to cover the line for field "Sub Account Number") needs to be changed to "white".

Sample Database Fields:
Head Account Number: HEAD_ACCT_NBR
Sub Account Number: SUB_ACCT_NBR


Sample Suppress Formula for Text Field used to suppress line for Sub Account Number Field:
The text field needs to be suppressed when there is data for Head Account Number field (to display the line beneath it for Sub Account Number) else, needs to be displayed to suppress the line.

Suppress logic:
if not isNull(HEAD_ACCT_NBR) then true
else false;
 
Note:
This can be used for more than 2 fields also, as the text fields to cover the lines can be suppressed dynamically based on different suppress conditions.

Labels in this area