jakubhertyk Posted August 9, 2007 Share Posted August 9, 2007 Hello, I searched high and low for an answer to this but I am not even sure what to call this situation. I am trying to create, for a lack of a better word, two Parallel groups. :P I am pretty sure that I can achieve this with one group plus a sub-report that does a retrieve for each "detail" row but I was hoping not to resort to that. Lets say that each person in the DB has a House (first table) and a Car (second table). The report should look as follows: Person 1House 1[/ul]Car 1Car 2[/ul] Person 2House 1House 2[/ul]Car 1Car 2Car 3[/ul] ...etc It will list first the Houses for the person then the Cars. Is this possible with one report and two groups? Crossing fingers, Jakub Link to comment Share on other sites More sharing options...
jmaher Posted August 9, 2007 Share Posted August 9, 2007 You could try doing a UNION in SQL to get data from both tables.. EG (SELECT person,houseFROM ...)UNION(SELECT person,carsFROM ...) you have to look into your DB's implementation of UNION to get the specifics (eg you must select the same number of columns from each table in the example above there are two and it's best if the data types are the same eg you don't mix strings and numbers) Jamie Link to comment Share on other sites More sharing options...
jakubhertyk Posted August 9, 2007 Author Share Posted August 9, 2007 That is a possibility. The only problem is that the House and Car have other attributes (of mixed types) that have to be displayed as well. They have different number of attributes as too, eg the House has a built date, and comments while the Car has a color, max speed and transmission type. Jakub Link to comment Share on other sites More sharing options...
jmaher Posted August 13, 2007 Share Posted August 13, 2007 It would still be possible to use UNION in that case if you're just looking for a SQL solution.. Just add NULL values to columns that the other table doesn't have.. eg (SELECT id,name, ...(same attributes), NULL AS carColorFROM house)UNION(SELECT id,name, ...(same attributes), color AS carColorFROM car) Either that or you'll probably have to resort to a subreport pulling the extra details like you mentioned before.. Jamie Link to comment Share on other sites More sharing options...
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