One of biggest issues people have with the Microsoft Dynamics GP Report Writer is not being able to create the desired table relationships from tables on the report to other tables so that the other tables can be added to the report and behave correctly.
The technique below explains how to get a one-to-many table relationship to behave as a one to one relationship. This is assuming that you can get the relationship created but have been unable to match all the fields to limit the relationship to one-to-one. We are also assuming that you are able to add the table to the report and are not limited by a pre-existing one-to-many relationship at the same level on the report.
The best method to explain the technique is with an example. I want to show the Tax Detail information added to a General Ledger Journal Entry transaction using the Tax Entry window (needs to be turned on in company options) on the General Posting Edit List report.
The Tax information is stored in the glTaxWork (GL10300) General Ledger Tax Work table. The Journal's Distribution Lists are being printed from the GL_Allocation_Register_Work (GL50101) Allocation Amounts Temporary table. So we need to create a one-to-one relationship from the GL_Allocation_Register_Work table to the glTaxWork table.
Theory: To create a one-to-one relationship you must select a key in the secondary table that does not allow duplicates AND must match all of the fields in the key. If you cannot meet both conditions, the Relationship Type with show as Multiple Records, meaning a one-to-many relationship.
Here are the steps:
The demonstration package of the General Posting Edit List report for v10.0 is attached to the bottom of this article.
Here are some reasons why you might not be able to create the relationship and add the table to the report. In these cases you would have to use alternative techniques:
The following articles provide some other methods that might help in these situations:
RW - Accessing any SQL data from a Report Example Modifying Reports which use Temporary Tables
RW - Accessing any SQL data from a Report Example
Modifying Reports which use Temporary Tables
Post a comment if this was helpful to you.
David
One of biggest issues people have with the Microsoft Dynamics GP Report Writer is not being able to create
David Musgrave takes a look at making one to many table relationships behave like one to one relationships
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.