Dear Nav Expert,
I have tried to find any related post about my question, however i have no luck as I not even know what keyword I should use, sorry if got similar post.
Back to question, recently I tried to add additional column in report, named as "No." and it show report line no.(example 1, 2 3... etc). You may check the sample I attached.
I use my own customize code to handle in VB(I simply don't like to pass many value from Nav to VB ). However some odd thing happen. When I print or preview with multiple document, result show exactly same and "No." work as i expected. But when i print in PDF or direct printer in single document, its show 4,5,6 instead of 1,2,3, more weird is preview, word and excel work correctly.
Not sure how to upload my work so i write the code here.
{ //This code is writen in VB Code
Shared LineNo as Integer
Shared ExDocNo as String
Public Function GetLineNo (CurDocNo as String)
If ExDocNo <> CurDocNo then
LineNo = 1
ExDocNo = CurDocNo
else
LineNo = LineNo + 1
End if
Return LineNo
End Function
}
{//And This code is added in new column, before Item No.
=Code.GetLineNo(Fields!No_SalesInvHdr.Value)
}
Is anyone have idea what happen? Is my code not correct or something?
Thank you.
Best Regards,
Alex
I have tried to find any related post about my question, however i have no luck as I not even know what keyword I should use, sorry if got similar post.
Back to question, recently I tried to add additional column in report, named as "No." and it show report line no.(example 1, 2 3... etc). You may check the sample I attached.
I use my own customize code to handle in VB(I simply don't like to pass many value from Nav to VB ). However some odd thing happen. When I print or preview with multiple document, result show exactly same and "No." work as i expected. But when i print in PDF or direct printer in single document, its show 4,5,6 instead of 1,2,3, more weird is preview, word and excel work correctly.
Not sure how to upload my work so i write the code here.
{ //This code is writen in VB Code
Shared LineNo as Integer
Shared ExDocNo as String
Public Function GetLineNo (CurDocNo as String)
If ExDocNo <> CurDocNo then
LineNo = 1
ExDocNo = CurDocNo
else
LineNo = LineNo + 1
End if
Return LineNo
End Function
}
{//And This code is added in new column, before Item No.
=Code.GetLineNo(Fields!No_SalesInvHdr.Value)
}
Is anyone have idea what happen? Is my code not correct or something?
Thank you.
Best Regards,
Alex