report multiple details on one line 
Author Message
 report multiple details on one line

I am trying to generate a report that has header data, but contains
essentially multiple columns of detail data.  Without doing anything
special the report I am trying to generate would look like this:

Name1 address1 phone1 email1
  Class1
     5
     7
     9
     11
     15
  Class2
     1
     14

Name2 address2 phone2 email2
  Class1
     27
     28
     41
  Class5
     16
     22

What I would like the report to look like is as follows:

Name1 address1 phone1 email1
  Class1
     5     7     9     11     15
  Class2
     1     14

Name2 address2 phone2 email2
  Class1
     27     28     41
  Class5
     16     22

How can I make the report do this.  The field containing the number is
called p_num.  Essentially I want to put p_num five times in the detail
section saying take the value from the next record for each one.  Of
course, if there is no more detailed data, it should go to the next row
to print the next header record.



Tue, 04 May 2004 05:38:18 GMT  
 report multiple details on one line
Hi Eric,

Create a report with sorting and grouping on the
Name, Class and p_num fields.  Set the group
header and group footer to YES for the Name and
Class fields.

Put the Name, Address, Phone and email fields in
the Name Group Header.

Put the Class field in the Class Group Header.

Put the p_num field in the detail section five times,
horizontally aligned.  In the NAME property for each
of these controls, call them p_num_1, p_num_2,
p_num_3, p_num_4, and p_num_5 respectively.
(The control source property is p_num for all five
controls.)

Copy and paste the following code into the class
module for the report:

'   General declaration at top of module:
Dim iCount As Integer

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
'   Code for ON FORMAT event of the CLASS group header.
    iCount = 1
End Sub

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'   Code for the ON FORMAT event of the DETAIL section.

    Me.p_num_1.Visible = False
    Me.p_num_2.Visible = False
    Me.p_num_3.Visible = False
    Me.p_num_4.Visible = False
    Me.p_num_5.Visible = False

    Select Case iCount
    Case 1
        Me.p_num_1.Visible = True
    Case 2
        Me.p_num_2.Visible = True
    Case 3
        Me.p_num_3.Visible = True
    Case 4
        Me.p_num_4.Visible = True
    Case 5
        Me.p_num_5.Visible = True
    End Select

    Me.MoveLayout = False
    iCount = iCount + 1

End Sub

That will do it.
Good luck
Geoff.



Wed, 05 May 2004 20:47:38 GMT  
 report multiple details on one line
Eric:

BTW - I assumed you have all your data in one table.  If you'd had your
class data in a child table, you could have created a subreport that used
columns.

Geoff



Thu, 06 May 2004 04:21:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need to display multiple lines mini report within one record in a report

2. Label Report: Print Detail Line X Multiple Times

3. Link multiple datagrids to a single record (Master\Detail Form with multiple details)

4. One Report To Multiple Trays Of One Printer

5. q:Crystal reports multiple heading sections in one report

6. Printing multiple reports as one report

7. How to compile multiple reports into one executable under Crystal Report 6.0

8. how to deal with 2 details in one report(urgent)

9. line numbers in detail section od report

10. Multiple lines to one

11. VB3.0: How to print one string on multiple lines

12. Squeeze multiple spaces on a line into one - Without RegExp Object

 

 
Powered by phpBB® Forum Software