1. Tracy Lamb
  2. PowerBuilder
  3. Tuesday, 18 June 2024 21:21 PM UTC

Hi all,

I have a report with a nested report.  On my computer in the development environment, when I run the report, I get the correct information.  But when my customer runs the report (compiled in a pbd), he gets the wrong value for one of the fields.

In the invoice table, there 4 fields extracted: invoice_nbr, lab_total, taxable_total, and tax_rate. On the report there's a computed field cf_tax.

When customer runs the report, the values in the database are:

invoice_nbr: 200027140
lab_totall: 2860.00
taxable_total: 2860.00
tax_rate: 0.065
cf_tax: 185.90

But the report is showing the taxable_total as 0.07 ... even though that's not what's in the database.  And the taxable total is showing correctly on the report, 185.90.  I triple checked to make sure the taxable_total was indeed the field that was displaying.

Any ideas?  I fixed it by adding a computed field, cf_taxable_total that is just round(taxable_total, 2).  But still would like to know why this happened?

TIA,
~~~Tracy

 

Accepted Answer
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2024 20:16 PM UTC
  2. PowerBuilder
  3. # Permalink
Or you can try de-selecting the column in the dw, save it. Then re-open and re-select the same column and save the dw.
Comment
  1. Tracy Lamb
  2. Wednesday, 19 June 2024 20:18 PM UTC
Thank you! Sure was much easier than re-creating the whole dw!

~~~Tracy
  1. Helpful
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2024 08:10 AM UTC
  2. PowerBuilder
  3. # 1

The 0.07 seems to be the value of tax_rate (0.065) rounded to two decimals. This suggests that this value is somehow being displayed in the taxable_total field. I've seen jumbled values like this sometimes, when the dwo became corrupted somehow. Try recreating the DW from scratch and deploying the pbd again.

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2024 06:41 AM UTC
  2. PowerBuilder
  3. # 2

Since your new computed field is displaying the correct value, you should be getting the value right in the datawindow.  You can verify that 

1.  By displaying the same value, at another place, without setting any formats.
2.  Can you verify whether any formats have been set, that displaying the value wrong?
3.  Or some scripts that modifies the value of that particular column, after retrieval?

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 18 June 2024 23:59 PM UTC
  2. PowerBuilder
  3. # 3

Hi Tracy;

  I've seen this a few times in my PB career. Most of the time, it turns out to be bad data in the production environment vs my test DBl (or vise versa).  Food for thought.

Regards ... Chris 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.