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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to print DUOS field in Report Writer 1

Status
Not open for further replies.

SpeedyGonza

Technical User
Nov 16, 2004
18
CA
I need to create a comment field for each grid line item in Inventory Transaction Entry. I have created a text field in Modifier. I have write a code using the DUOSObject in VB using a DUOSObjectCombinedID made up of the Document number and Line SEQ number. The data seems to save and retrieve fine from SYS90000.
Now I need to modifify the IV Transaction History Report and I do not know how to pull out the DUOSObject. I've tried to follow the examples from vbadataaccessoptions.pdf and VBADevelopersGuide.pdf (in GP documentation) but the example it shows involve Customer Maintenace which doesn't require a grid and doesn't involve a combined primary key. It mentioned adding the DUOS field as a calculated field but it doesn't show exactly how.
Any help and comments is greatly appreciated.
 
The code to retrieve the information from the DUOS is almost identical to the code you would have used on the window.

Create a calculated field of the appropriate datatype which has a empty constant value. Drag this onto the report and add it to VBA. Now you can use VBA code to populate this calculated field with the values from the DUOS.

Does that help?

David Musgrave [MSFT]
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Hi Mr. Musgrave,
Thank you for your reply. I've already found an example VB code in the VBADevelopersGuide.pdf in the GP documentation directory. But my problem is I don't know how to add a calculated field and I got a "type mismatch" error when trying to print the report. I made my field with the result data type. But I'm not sure if I have to what "resources" to choose in the Fields Tab. Also in the Constants Tab "Type" drop-down list and the Constant field what should I set them as? And for the "Functions" tab do I have to choose system-defined or user-defined function? Really I don't have any function to calculate or format...just needed a place to print out my DUOS field.
Sorry it sounds silly to ask for so much detail but I'm quite a newbie to GP. Thank you again.
SpeedyGonza
 
I got it now...I had a problem with formating my combinedID to the exact representation in the SQL database that's why I have trouble to print them out previously. Thank you all.
Speedy Gonza
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top