localzuk Posted October 16, 2009 Posted October 16, 2009 I have a report I wish to create for a program I am working on. This report should grab data from 2 tables - A transactions table, and then for each transaction, and each transaction has data relevant to it from another table - namely the items that made up that transaction. In text form it would look something like this: -Transaction --Item --Item --Item -Transaction --Item --Item etc... Any idea how to do this? I'm a bit of a Crystal Reports noob.
mossj Posted October 17, 2009 Posted October 17, 2009 Need more info... then mayb I can help you have 2 tables, yes? Transaction table, with what columns? Same for the other one what columns? If you use logic I'm going to assume they look like this Tran Table - (PK), Tran ID, Item ID(FK) Item Table - Item ID (PK), Item Name I would do (based on Oracle, SQL, Access experiance)... A group by "Tran ID" with a join on "Item ID" to show "Item name" Not sure how you do that in crystal but from my experiance all reporting software works the same sort of way.
localzuk Posted October 17, 2009 Author Posted October 17, 2009 Yeah, in the end I am INNER JOINS in SQL instead of subreports or anything in crystal.
topazg Posted November 9, 2009 Posted November 9, 2009 Inner joins for the selection script and using Crystal report groupings will be the most efficient way of doing this in my experience. You want to have it in the join regardless to prevent any cartesian nonsense, and using subreports for the internal selections will result in a much bigger (proportionally, at least) database load to extract the information.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now