<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Crossposted Acess-L& AccessD</FONT></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm in the very beginning of a tiny little app, and
need some advice. The main goal of this little application is to print a report
for each customer, like:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Customer Name</FONT></DIV>
<DIV><FONT face=Arial size=2>
OrderNo1 OrderNo2
...etc.</FONT></DIV>
<DIV><FONT face=Arial size=2>ItemNo ItemName Amount1
Amount2</FONT></DIV>
<DIV><FONT face=Arial size=2>E.g.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Ervin Brindza</FONT></DIV>
<DIV><FONT face=Arial
size=2>
O1 O2....</FONT></DIV>
<DIV><FONT face=Arial size=2>1.
Fish 1.5
1.3</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Meat
2.3 2.4</FONT></DIV>
<DIV><FONT face=Arial size=2>3. Flour
4.5 3.5</FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2>I made an "Order -> OrderDetails"(1 to
many) form and subform(Order:CustomerName, OrderNo;OrderDetails: ItemNo,
ItemName, Amount) , and when the new order is requested I generate the
items in the subform(from the Products table), and the user input the amount
values. Then each order have to be listed on the report as one column,
like above.</FONT></DIV>
<DIV><FONT face=Arial size=2>I tried with crosstab query, and the query is ok,
but when I try to use it in report wizard there is no fields, and I don't know
how to make a report?</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is the SQL:</FONT></DIV>
<DIV><FONT face=Arial size=2>qryOrderAndDetail:</FONT></DIV>
<DIV><FONT face=Arial size=2>SELECT DISTINCTROW Order.OrderId, Order.OrderNo,
Order.CustomerName, OrderDetails.ItemNo, OrderDetails.ItemName,
OrderDetails.Amount<BR>FROM [Order] INNER JOIN OrderDetails ON Order.OrderId =
OrderDetails.OrderId;<BR></FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>qryCross:</FONT></DIV>
<DIV><FONT face=Arial size=2>PARAMETERS Forms!frm1!Customer Text;<BR>TRANSFORM
Sum(qryOrderAndDetail.Amount) AS [The Value]<BR>SELECT
qryOrderAndDetail.ItemName, Sum(qryOrderAndDetail.Amount) AS [Total Of
Amount]<BR>FROM qryOrderAndDetail<BR>WHERE
(((qryOrderAndDetail.CustomerName)=[Forms]![frm1]![Customer]))<BR>GROUP BY
qryOrderAndDetail.ItemName, qryOrderAndDetail.CustomerName<BR>PIVOT
qryOrderAndDetail.OrderNo;<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Many thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2> Ervin</DIV></FONT></BODY></HTML>