I wrote this out in the hopes that I'd figure out a solution once I had it laid before me, but nooooo. So I'm turning to my much smarter readers for advice. /o.o
( Read more... )
It sounds like you want more then one table? Because what row the stuff in column 3 appears in isn't related to the data in column 2.
So you'd have two tables for Foo Inc, one with unique loan numbers and one with unique guarantors. Then you arrange them on the page so that they look like one table?
I don't actually know Crystal Reports at all, so...
Yes, that's right. I don't know how to get the two tables to line up if I make them different tables, though. >.< Maybe it's something I can do with subreports.
The pivot table looks prettier, but, sadly, I can't figure out a way to get it to cut guarantors if they appear attached to another loan (or vice versa), so it's still humonguous. :/ Like Terry said, the problem is that I really want a table of guarantors and a table of loans presented side-by-side because they're ... both ... connected to the same borrower.
... and it occurs to me as I write this that I might be able to fix this by fiddling with my table joins in Crystal. I need to look at that! >.>
I could do that in Perl, Java or C# - but somehow I don't think that's what you're working with. ;D SQL by itself probably can't do that unless you're using some scripted SQL-fu like Postgres. And now I'm babbling. =D
On the SQL-fu front, what you really want is two select distincts within each borrower with the results merged together. I could do it cleanly (generating one set of output results) using a SQL procedural language (like PL-SQL for Oracle or T-SQL for SQL Server), but here's something in vanilla SQL which doesn't come that far from what you want
( ... )
Doing them as distinct lists I can manage. It's the merge part that I can't figure out -- how to get the list of borrwers & loans to line up with the list of borrowers & guarantors. :/
The first way to do this I can think of in procedural SQL uses two temporary tables each with an autoincrement column (the results of the group-by tables you mentioned), and a third temporary table containing the target report. Use the autoincrement column to decide which order to create the rows in the third table, and then do the correct updating.
As for actually massaging it out of an SQL statement: the lightning from Father in Heaven is not present this instant. Please accept my apologies.
Comments 10
So you'd have two tables for Foo Inc, one with unique loan numbers and one with unique guarantors. Then you arrange them on the page so that they look like one table?
I don't actually know Crystal Reports at all, so...
Reply
Reply
(The comment has been removed)
Reply
... and it occurs to me as I write this that I might be able to fix this by fiddling with my table joins in Crystal. I need to look at that! >.>
Reply
Reply
Reply
Reply
Reply
As for actually massaging it out of an SQL statement: the lightning from Father in Heaven is not present this instant. Please accept my apologies.
Reply
Leave a comment