Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Rows to single row

Status
Not open for further replies.

Nithya

Technical User
Jul 18, 2001
15
PH
hi
I have a table with 2 fields - one is date field(Schedule_date) and the other is a number field(Scheduled_Quantity).I have to prepare a report which displays the Scheduled_Quantity for all the days in a month.In the backend,I have one record for every Schedule_date.So,if there is no record for a particular day in that month,then quantity will be zero in the report not in the backend.The current format of the report is :

Date: 1 2 3 4 5 6 7 8 9 10 11 12 ............31
Qty :
10 0 0 0 0 0 0 0 0 0 0 0...............0
0 0 0 0 0 0 0 0 0 0 12 0...............0

The above report says that there are 10 quantities scheduled on 1st,12 quantities scheduled on 11th.
I want the report to be in the following format:

Date: 1 2 3 4 5 6 7 8 9 10 11 12 .............31
Qty : 10 0 0 0 0 0 0 0 0 0 12 0................0

This is an urgent requirement.Pls help me out on this.
Thanks in advance
nit

 
Hi,

At least two approaches are available.

Group by month
Put the date: 1 2 3 .. 31 in the group header
Create 31 summary totals (output in the group footer)
Then suppress the details

or

Group by month
Put the date: 1 2 3 .. 31 in the group header
Use a formula to concatenate the values into a string
eg. {@formula_Qty_line}
stringvar outline;
if day({Schedule_date}) = 1 then
outline := "Qty: "+totext({qty},"###")+" "
else
outline := outline + totext({qty},"###")+" ";
outline

Create a second formula to go in the group footer
eg. {@display_Qty_line}
stringvar outline;
outline

suppress the details


Note that the output fields must be displayed using a fixed width font (eg. courier new)


Hth,
Geoff
 
thanks
but i was not able to solve the problem.....it is again displying 2 rows even when placed in the group footer.
pls help me out on this.
thanks in advance
nit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top