Hi all,
As shown in the picture above, I have in form level that row as a negative value.
I checked DP there is no related these kinda records.
And, I found it in the Design <Text box properties<Number <Custom <Expression>
=switch(Fields!AmountMST.Value mod 1 = 0 ,"#,0",Fields!AmountMST.Value mod 1 <> 0,"#,0.00")
i don't understand behind the Expression.
Now, i want to in the report in form level "Basic salary", "Housing" ....... if its negative i want to in the report as a negative.
if its positive value i want to as a positive so that what should i do ?
Thanks
Hi Riyas,
What is the basis for Debit and Credit?
If the amountmst itself has positive and negative values, then you could use the value directly.
Hi Riyas,
Looks like this block of code is converting the negative number to positive
if(MPPayCycleDebCrReport.DebitCredit == DebitCredit::Credit) { MPPayCycleDebCrReport.AmountMST = -1 * amt; } else { MPPayCycleDebCrReport.AmountMST = amt; }
You can simply replace this block of code with this line so that the values are not converted
MPPayCycleDebCrReport.AmountMST = amt;
Thanks for replay Mr. Gunjan,
Yes i did it, in DP class below my code.
while select setupDetails where setupDetails.MPReportSetup == contract.parmreportSetup() { amt = setupDetails.EvaluateColumn(pcw.PayCycleID,pcw.Worker); MPPayCycleDebCrReport.DebitCredit = setupDetails.debCred(); MPPayCycleDebCrReport.Description = setupDetails.colDesc(); MPPayCycleDebCrReport.ColNum = setupdetails.ColNum; MPPayCycleDebCrReport.AdditionDeduction = setupdetails.AdditionDeduction; // Added By Saad //breakpoint; //info(strFmt("%1", worker.grossSalary())); if(MPPayCycleDebCrReport.DebitCredit == DebitCredit::Credit) { MPPayCycleDebCrReport.AmountMST = -1 * amt; } else { MPPayCycleDebCrReport.AmountMST = amt; } MPPayCycleDebCrReport.insert(); }
Thanks for replay Mr.Martin,
in design its showing positive records but form level there is negative as a highlight the records.
Hi Riyas,
This expression does not convert amountMST to a positive or negative number. Please check the value of the field.
Hi Riyas,
Looks like this expression is setting the custom expression for the number expression based on the AmountMST field value. This won't have any impact on positive or negative values. Did you debug the DP class to check the values inserted for "Basic salary", "Housing" etc.?
The expression seems to say that if AmountMST is a whole number, the number format should be "#,0", otherwise it should be "#,0.00".
Note that I don't see any negative value shown in your picture.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156