Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Writer Issue - Calculated Field Holding Previous Value when Current record is Blank

Status
Not open for further replies.

DavidMizzou

Programmer
May 16, 2012
6
US
I am running into an unusual behavior within Report Writer in GP 2010 R2 (11.00.1935)

I am modifying a report, PA Billing Invoice Format – Invoice Format 5, and putting a table field (PA Billing Notes MSTR TEMP.PA Text 32000) into a Calculated Field. Call it PA32000Note.

If I display the field directly on the report (PA Billing Notes MSTR TEMP.PA Text 32000) I see it when there is a note, and it is empty when there is no note. As expected.

If I drop the Calculated Field on the report, it shows a note when one exists and previous row’s note when there is no note for the current record/row. The calculated field appears to be holding the previous row’s value when calculated field (PA Billing Notes MSTR TEMP.PA Text 32000) for the current row is blank.

*****
I originally had entered it in as a conditional calculated field, but made it a straight calculated field with the same PA Billing Notes MSTR TEMP.PA Text 32000 field in it to simplify and isolate the symptom.

1. Printing is from the Billing Entry screen in GP.
2. Invoice has not yet been posted.
3. Other rows with non-blank notes display fine.
4. Yes, I have rights to the report.
5. Yes, I see other changes to the report ok.
 
Could it be a relationship issue between the PA Billing Notes MSTR TEMP and the other table(s)?
 
I don't believe so. I went back to a copy of the original stock GP report, added the fields, and tested there with the same results.

Interesting note, a SQL trace shows the calls to PA01601 for each row and shows me the note number for each row. The ones I expect to be blank are returning blank at the SQL level. It acts like the calculated field in Report Writer is not always refreshing between calls.
 
Note fields can be problematic. I remember from using D-Base & FoxPro years back note fields occasionally would lose their index reference and we all know what a corrupted index can do. In the previous life, I avoided note fields whenever possible when constructing tables.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top