how to add two command in detail section of datareport

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohd swaleh
    New Member
    • Jan 2012
    • 1

    #1

    how to add two command in detail section of datareport

    my shabpe String is given below
    but it is not working
    Code:
    sqlw = "SHAPE {SELECT * FROM labour_main}" _
                & " AS RsMain APPEND ({SELECT * FROM labour_child1}" _
                & " AS RsFamily RELATE reg_no TO reg_no) AS RsFamily," _
                & "({SELECT * FROM labour_child2}  AS RsReg" _
                & " RELATE reg_no TO reg_no) AS RsReg"
    
    and code of report is
    Private Sub SetSection1()
        Sections("Section1").Controls("TEXT2").DataMember = "RsFamily"
        Sections("Section1").Controls("TEXT17").DataMember = "RsFamily"
        Sections("Section1").Controls("TEXT18").DataMember = "RsFamily"
        
        Sections("Section1").Controls("text2").DataField = "relation"
        Sections("Section1").Controls("text17").DataField = "name"
        Sections("Section1").Controls("text18").DataField = "age"
    
    
        Sections("Section1").Controls("TEXT19").DataMember = "RsReg"
        Sections("Section1").Controls("TEXT20").DataMember = "RsReg"
        Sections("Section1").Controls("TEXT21").DataMember = "RsReg"
        Sections("Section1").Controls("TEXT22").DataMember = "RsReg"
        Sections("Section1").Controls("TEXT3").DataMember = "RsReg"
        
        
    
        Sections("Section1").Controls("TEXT19").DataField = "reg_date"
        Sections("Section1").Controls("TEXT20").DataField = "bank_cash"
        Sections("Section1").Controls("TEXT3").DataField = "amount"
        Sections("Section1").Controls("TEXT21").DataField = "bill_no"
        Sections("Section1").Controls("TEXT22").DataField = "payment_mode"
    end sub
  • Mihail
    Contributor
    • Apr 2011
    • 759

    #2
    I am not an expert, so I can't be sure, but... what is the SHAPE word in the SELECT clause of SQLW ?

    Comment

    Working...