Jump to content

Recommended Posts

Posted

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.

Posted

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.

  • 4 weeks later...
Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...