Print Page | Close Window

String Manipulation

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22481
Printed Date: 27 Apr 2024 at 11:32am


Topic: String Manipulation
Posted By: Teddy555
Subject: String Manipulation
Date Posted: 19 Oct 2017 at 3:42am
Good day ,

Is it Possible to have the last record in a string field print first , rather than it being the other way around . Reason being i have a payslip with deductions and earnings coming from the same field and when the report is generated the deductions column in my report is printed lower than the earnings rather than being level .

-------------
T.Calderon



Replies:
Posted By: kevlray
Date Posted: 19 Oct 2017 at 6:36am
First off, we need to work on terminology. A record is considered a row in a table of a database.  So your first statement does not make sense.

But further reading, it appears that you have an alignment issue.  with the fields in question.  Which should be easy to resolve.

If the data is in all one field then there should not be an alignment issue.


Posted By: Teddy555
Date Posted: 20 Oct 2017 at 4:08am
Let me explain my situation a little better .

I have one field which houses both earnings and deductions .
I am creating a payslip to be run in sage so that the employees can be paid with the ability to see how they are getting paid and what deductions they have incurred.

Example of layout :
Earnings:               Deductions:
Wages                    National Insurance
Service Charge          Bank Charges
Holiday Pay
Overtime


In truth this is what i need to accomplish , the layout above . The problem i am experiencing is that both the data on the left and right come from the same field . Is there a way to seperate the data like listed above . Just incase anyone doesnt understand .
When the field is added to the report it looks like :


Wages                          
Service Charge
Holiday Pay
Overtime
Bank Charges
National Insurance.

I need to split the above into two Columns if thats possible .


-------------
T.Calderon


Posted By: Teddy555
Date Posted: 20 Oct 2017 at 4:18am
There is no Alignment Issue .

View attached image .

https://ibb.co/nxUYi6

This is what the report looks like currently .
I am able to accomplish this by including a supression formula on the field to say :

if {@Shortdesc} like ['Hoilday Pay','Off With Pay','Overtime','Service Charge','Sick Benefit','Sick Benefit 2','Tips','Wages','ZNet Pay','Comp. Leave','Vacation Pay'] then yes

Every Earning is listed in the Brackets of my Formula.
So when the report is run it basically leaves the line blank if the Earning exists for that employee and prints everything outside the formula range which would be the deductions in this case. However i need it to remove the earnings listed in the formula instead of just leaving it blank.
Hope you do understand.







-------------
T.Calderon


Posted By: Teddy555
Date Posted: 23 Oct 2017 at 9:22am
Can Somebody Please Assist ?


-------------
T.Calderon


Posted By: Teddy555
Date Posted: 25 Oct 2017 at 9:21am
Does my Task make no sense to the community ?

:( :(

-------------
T.Calderon


Posted By: DBlank
Date Posted: 25 Oct 2017 at 9:51am
Are you trying to concatenate multiple rows into one field as well? If so then use a shared variable to only concatenate items that fit your earnings category display that in the group footer next similar shared variable formulas that only include 'deductions'


Posted By: Teddy555
Date Posted: 30 Oct 2017 at 10:30am
Actually i am trying to achieve the opposite of that , the one field has all the information and i would like to split it into two different fields depending on the Employee Data.

-------------
T.Calderon


Posted By: DBlank
Date Posted: 31 Oct 2017 at 4:40am
is this all in "one field" or one column and different rows

Wages                           
Service Charge
Holiday Pay
Overtime
Bank Charges
National Insurance.


Posted By: Teddy555
Date Posted: 10 Nov 2017 at 4:46am
One Column , Different Rows .

-------------
T.Calderon


Posted By: DBlank
Date Posted: 10 Nov 2017 at 6:02am
If you can display these in the footer you can create two different sets of variable formulas to concatenate the rows into a single string and conditional include or exclude a value based (per formula) based on the type.



Print Page | Close Window