Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages
Started by Vladimir Stefanovic
Sun, 19 Jun 2005 09:35
Making a QR report ...
Author: Vladimir Stefanovic
Date: Sun, 19 Jun 2005 09:35
Date: Sun, 19 Jun 2005 09:35
61 lines
2557 bytes
2557 bytes
Hi, I need help on how to make a Report with TQReport. All data is stored in *one* table, and this is the imaginary layout: ------------------------------------------ ID F1 F2 F3 F4 F5 ------------------------------------------ ID1 FIELD11 AAAAAA FIELD13 FIELD14 FIELD15 ID2 FIELD21 BBBBBB FIELD23 FIELD24 FIELD25 ID3 FIELD31 BBBBBB FIELD33 FIELD34 FIELD35 ID4 FIELD41 AAAAAA FIELD43 FIELD44 FIELD45 ID5 FIELD51 CCCCCC FIELD53 FIELD54 FIELD55 ID6 FIELD61 BBBBBB FIELD63 FIELD64 FIELD65 ID7 FIELD71 AAAAAA FIELD73 FIELD74 FIELD75 ID8 FIELD81 CCCCCC FIELD83 FIELD84 FIELD85 ID9 FIELD91 CCCCCC FIELD93 FIELD94 FIELD95 I want the Report to look like this: (Grouped by F2, and further, if possible, sorted by the value of ID) AAAAAA ----------------------------------- ID1 FIELD11 FIELD13 FIELD14 FIELD15 ID4 FIELD41 FIELD43 FIELD44 FIELD45 ID7 FIELD71 FIELD73 FIELD74 FIELD75 BBBBBB ----------------------------------- ID2 FIELD21 FIELD23 FIELD24 FIELD25 ID3 FIELD31 FIELD33 FIELD34 FIELD35 ID6 FIELD61 FIELD63 FIELD64 FIELD65 CCCCCC ----------------------------------- ID5 FIELD51 FIELD53 FIELD54 FIELD55 ID8 FIELD81 FIELD83 FIELD84 FIELD85 ID9 FIELD91 FIELD93 FIELD94 FIELD95 I have no clue of how to start or what SQL to use for this. Any help would be appriciated: * What SQL to use * What related QR components to use Till now I made only the most simple Reports with QR. Do you think it would be smart to make a Temporary Table which will Hold only the values of F2: SELECT * FROM MY_TABLE GROUP BY F2 ... and further work with two tables insted of one? -- Best regards, Vladimir Stefanovic
Re: Making a QR report ...
Author: Vladimir Stefanovic
Date: Sun, 19 Jun 2005 15:32
Date: Sun, 19 Jun 2005 15:32
61 lines
2231 bytes
2231 bytes
Some changes to the problem: Hi , The bad news is that my problem become more complicated, but maybe easier to solve because now I have two sources available (if needed). Here it is: TABLE: -------------- F1 F2 F3 -------------- AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH IIII Note: F1+F2+F3 == "PRIMARY KEY" IN THE TABLE (NO DUPLICATES) QUERY: -------------------------------------- ID xxxx xxxx F1 F2 F3 xxxx xxxx -------------------------------------- ID1 xxxx xxxx AAAA BBBB CCCC xxxx xxxx ID2 xxxx xxxx AAAA BBBB CCCC xxxx xxxx ID3 xxxx xxxx AAAA BBBB CCCC xxxx xxxx ID4 xxxx xxxx GGGG HHHH IIII xxxx xxxx ID5 xxxx xxxx DDDD EEEE FFFF xxxx xxxx ID6 xxxx xxxx DDDD EEEE FFFF xxxx xxxx ID7 xxxx xxxx GGGG HHHH IIII xxxx xxxx ID8 xxxx xxxx AAAA BBBB CCCC xxxx xxxx Now, I need this as the QR Output: AAAA, BBBB, CCCC --------------------------------------- ID1 xxxx xxxx xxxx xxxx ID2 xxxx xxxx xxxx xxxx ID3 xxxx xxxx xxxx xxxx ID8 xxxx xxxx xxxx xxxx DDDD, EEEE, FFFF --------------------------------------- ID5 xxxx xxxx xxxx xxxx ID6 xxxx xxxx xxxx xxxx GGGG, HHHH, IIII --------------------------------------- ID4 xxxx xxxx xxxx xxxx ID7 xxxx xxxx xxxx xxxx Can you help me with that? -- Best regards, Vladimir Stefanovic
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads