Re: 2 detail reports from the one master?
"Charlie Chambers" <[email protected]> Thu, 6 Feb 2003 15:53:27 -0600
| Newsgroups | gmane.comp.lang.delphi.quick-reports |
|---|---|
| Message-ID | <027501c2ce2a$30594420$6d01a8c0@chas> |
Hi Tom, The solution i mentioned is the same that was mentioned by Peter. It's not a "pretty" solution but did get the problem for me fixed as like you i did not see an easy way to "fix" my need! Basically what i did was to configure a new data base that matched my paper form. This is basically turning the "banded" report to "non-banded" report and still using Quick Reports. That was the only trick. The Master was the top portion of the paper form and the Slave was the bottom. I set the code to move throught the master records, move each (master) over to the new db then to cycle through the Slave file filling in the number of fields available on the paper form. If there were more Slave fields than the form would hold i'd add the Master to a new record and put the remaining Slave fields into. That was it - just a lot of coding and not pretty but solved the problem. Hope that helps and is not too confusing. Charlie Chambers [email protected] ----- Original Message ----- From: Tom Nesler To: [email protected] Sent: Thursday, February 06, 2003 2:27 PM Subject: Re: [quick-reports] 2 detail reports from the one master? Hi Charlie! --- Charlie Chambers <[email protected]> wrote: > Greetings, > Don't want to intrude on the thread but i've had a similar situation > but not quite the same. I had a Master and slave that i wanted to put > the data on a form with a form bitmap. I could not get a banded > report to work as i wanted. I worked around this by creating another > datafile with each record filled with the data from the master(one > record) and slave(many records). > It's not a pretty solution but it did work. Is this a possible > solution for your case? > All the best, > Charlie Chambers Your comments are welcome! This gives me an idea...Potentially you could create a single detail query result set containing the data from both detail tables combined into one large table. Sort of like this: [Master Key--][...Detail-1Fields....][...Detail-2Fields....] Doing this, you would have blank fields in Detail-1 section when the Detail-2 section was filled and blank Detail-2 fields when the detail-1 fields were filled. To get this type of result you need to do an outer Join so that you get full records even when the matches are not complete. If you can do this then you would need to do some trickery to get your fields lined up correctly. For example, you might have a report with POs and Sales Orders needed for each item. Therefore your detail band would lokk like this: ------------------Detail band ------------------------- [PO Number][Due Date][Quantity][SO Number][Ship Date][Quantity] ------------------Detail band ------------------------- When you print this out it would look like this: 1234 12/12/02 1000 1235 01/01/03 500 1236 02/01/03 500 9990 12/31/02 500 9991 01/01/03 500 9992 02/01/03 500 Hope this helps. Let us know how you did it and what other tricks you used when you finish it. ===== Tom Nesler Live Long...Code Well... and Prosper! V __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ============================================= QReport Artist 5 - http://www.mensand.com/ The new version is available for Delphi 5.0 , Delphi 4.0 and Delphi 3, BC++Builder 3.0. and BC++Builder 4.0 ============================================= Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/i7folB/TM ---------------------------------------------------------------------~-> ============================================= QReport Artist 5 - http://www.mensand.com/ The new version is available for Delphi 5.0 , Delphi 4.0 and Delphi 3, BC++Builder 3.0. and BC++Builder 4.0 ============================================= Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/