|
| |
|
|
accessman
Posts: 74 Joined: 9/13/2005 Status: offline
|
Format Change - 9/14/2005 19:41:59
Hi Everybody: For example: Qry 1: [Vendor Name] [date1] [paid1] [date2] [paid2] [date3] [paid3] Micro_________1/2/05__$1 Micro_________2/1/05__$2 Micro______________________3/1/05_$3 Micro___________________________________4/1/05_$4 Micro______________________5/1/05_$5 How can I change to this format in the Report: [Vendor Name] [date1] [paid1] [date2] [paid2] [date3] [paid3] Micro_________1/2/05__$1____3/1/05_$3____4/1/05_$4 Micro_________2/1/05__$2____5/1/05_$5 I want to save the space. This way only shows 2 rows. So, Could you help me to solve this problem? Thanks a lot. Thanks.
|
|
|
|
rubyaim
Posts: 757 Joined: 6/22/2005 Status: offline
|
RE: Format Change - 9/14/2005 20:45:11
Edit: Bobby obviously types waayyyy faster tha I can ===== Anyway, FWIW, if this is in Access: Wild guess without knowing how your DB is set-up: Create 3 separate queries. Vendor1-Query. [Vendor] [Date 1] [Paid 1] Vendor2-Query. [Vendor] [Date 2] [Paid 2] Vendor3-Query. [Vendor] [Date 3] [Paid 3] And the 4th to bring it together (query the other queries) Select all fields from Vendor1, Date2 and Paid 2 from Vendor2 and Date3 and Paid 3 from Vendor3. For something like this the join properties between Vendor1 an Vendor2 would be option 3 - include all from Vendor1 and only those in Vendor2 where the joined fields are equal, and the join between Vendor1 and Vendor3 would be option 2 - include all from Vendor1 and only those from Vendor3 where they are equal. SQL would be something like:
SELECT Vendor1.Vendor AS Vendor1_Vendor, Vendor1.Date1 AS Vendor1_Date1, Vendor1.Paid1 AS Vendor1_ Paid1, Vendor2.Date2 AS Vendor2_ Date2, Vendor2.Paid2 AS Vendor2_ Paid2, Vendor3.Date3 AS Vendor3_Date3, Vendor3.Paid3 AS Vendor3_ Paid3
FROM (Vendor2 RIGHT JOIN Vendor1 ON Vendor2.Vendor = Vendor1.Vendor) LEFT JOIN Vendor3 ON Vendor1.Vendor = Vendor3.Vendor;
_____________________________
Sally
|
|
|
|
accessman
Posts: 74 Joined: 9/13/2005 Status: offline
|
RE: Format Change - 9/15/2005 2:33:40
No. It will shows duplicate value.
|
|
|
|
accessman
Posts: 74 Joined: 9/13/2005 Status: offline
|
RE: Format Change - 9/15/2005 12:00:57
Do you have any method ? Thanks.
|
|
|
|
dzirkelb1
Posts: 1324 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: Format Change - 9/15/2005 12:25:45
Loop is the way to go...something like this:
<%
DIM connReport
DIM sqlReport
DIM rsReport
myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/Database.mdb")
set connReport=server.createobject("adodb.connection")
connReport.open myDSN
sqlReport = "your query here"
set rsReport=connReport.execute(sqlReport)
IF rsReport.eof THEN
response.write("Problem with "&sqlReport)
ELSE
arrayReport=rsReport.getrows
for r=0 to ubound(arrayReport,2)
response.write("<table border=0 cellpadding=0 cellspacing=0>")
response.write("<tr>")
response.write("<td>"&arrayReport(0,r)&"</td>")
response.write("<td>"&arrayReport(1,r)&"</td>")
response.write("<td>"&arrayReport(2,r)&"</td>")
response.write("<td>"&arrayReport(3,r)&"</td>")
response.write("<td>"&arrayReport(4,r)&"</td>")
response.write("<td>"&arrayReport(5,r)&"</td>")
response.write("<td>"&arrayReport(6,r)&"</td>")
response.write("</tr>")
response.write("<tr>")
response.write("<td colspan=3>Micro_________1/2/05__$1</td>")
response.write("<td colspan=3>_________3/1/05__$3</td>")
response.write("<td>_____4/1/05__$4</td>")
response.write("</tr>")
response.write("<tr>")
response.write("<td colspan=3>Micro_________2/1/05__$2</td>")
response.write("<td colspan=3>_________5/1/05__$5</td>")
response.write("</tr>")
response.write("</table")
response.write("<br><br>")
next
%>
|
|
|
|
dzirkelb1
Posts: 1324 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: Format Change - 9/15/2005 12:34:40
If this is just to display on a report in Access, then just use the automated report wizard in a columnar fashion, go into design view once done, and move stuff around until you see it how you like.
|
|
|
|
accessman
Posts: 74 Joined: 9/13/2005 Status: offline
|
RE: Format Change - 9/15/2005 13:43:04
No. It doesn't work. It still show same format.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|