Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Is it possible to have sub-value marks in data be turned into line feeds in Run_Report?
This is for an OI 8.0.1 app. I have the following statement which I am passing to Run_Report.
LIST TABLE BIG04 COLHEAD "PO#" QTY_IT1 COLHEAD "qty" LOTNUM_IT1 COLHEAD "Lot#" EXPDATE_IT1 COLHEAD "Exp Date" WITH BIG04 = "01011011101" ID-SUPP BY BIG04
The data I want to make into line feeds are subvalue marks in a couple of the columns.
Thanks in advance.
LIST TABLE BIG04 COLHEAD "PO#" QTY_IT1 COLHEAD "qty" LOTNUM_IT1 COLHEAD "Lot#" EXPDATE_IT1 COLHEAD "Exp Date" WITH BIG04 = "01011011101" ID-SUPP BY BIG04
The data I want to make into line feeds are subvalue marks in a couple of the columns.
Thanks in advance.
Comments
I am trying this now and it is working, except for one anomaly. I have 3 data columns to which I want to apply this. So I set up 3 calculated columns, one for each of the data ones. The first two work for my test data, with the first value having 3 subvalues. The report is dropping the third subvalue in the first value for the third symbolic, which has this logic:
FLD = {EXPDATE_IT1}
swap @svm With \0D0A\ In FLD
@ANS = FLD
The other two symbolics have the same logic, with just the FLD value being different. As far as I can see, the data in that third field matches the others as far as the subvalue & value marks.
Any thoughts on this?
Thanks.
Roger
If, perchance, the @SVMs are quasi-linefeeds, then perhaps swapping them with @TM might work better. Make sure to change the justification to Test as well.
FLD = {EXPDATE_IT1}
swap @svm With \0D0A\ In FLD
convert @vm to '|' In FLD
@ANS = FLD
IMHO the @vm are associated to each @vm in fld1 (Is that amv)
Therefore this would make more sence
FLD = {EXPDATE_IT1}
convert @svm to '|' In FLD
@ANS = FLD
Don, check out the attached report output. The first record shows what I want, except there should be another Expdate value following the qty 6 and second lot# 234. This output comes with my original logic of swapping @svm to crlf.
I now suspect the reason why the final "20250522" is dropping off is because the dictionary column width value isn't big enough to store all that text. My theory is that when you use the CRLF delimiter, OI still sees all of the result as a single string. This is why I was suggesting using @VM instead so OI would look at each delimited value separately.
Can you see if adding width to the column definition resolves the problem? I'm not suggesting this is a perfect solution, but it would confirm my theory and give us more information that we can use to create a better solution.