Monday September 25th 2017

Categories

Insider

Archives

If Then Else Statement and applications using Crystal Reports

crystalreportsIf then else statements are very handy when the data structure is complicated. I came across a scenario where one of my client need a report to see operation cost stats of employee hours on transactions happening during selected date parameters.
The process was such that with each transaction following information was stored;
Transaction RECEIVED DATE and Transaction close date.
Within the above parameters following piece of information was also stored;
Section 1 start date and section 1 end date
Section 2 start date and section 2 end date
Section 3 Start date and section 3 end date
In such scenario it seems quite challenging to calculate the overall stats and stats within the all three section.
The above scenario can be solved by following steps;
1- Fetching the data by transaction received and closed date.
2- Creating a group formula using if then else statement as follows;
If Transaction section 1 start date and transaction section 1 end date then section 1
If Transaction section 2 start date and transaction section 2end date then section 2
If Transaction section 3 start date and transaction section 1 end date then section 3
By utilising above method we can group in 3 different sections and calculate their respective stats. Now management can see the stats by Transaction Received and Closed as well as by their respective sections and focus their attention on areas of concerns.

Kaleem Mian

Senior Crystal Reports Developer and Business Intelligence Analyst