Bind multiple tables values in Data Report RRS feed

  • Question

  • I had designed a project using VB 6.0 and SQL 2008. Data Storage part is over. Now i am stuck up with multiple display table values ​​in Data Report.

    Please find my tables below;

    Please find my data report (Required) design as below;

    The problem is displaying multiple recordsets in my datareport.

    I read some forum that can be achieved using DATASHAPE

    SHAPE {select Emp_Code,Emp_Name,Place_Office,Designation,Scale,PAN,DOJ,Pay_Level,GPF_No,PRAN from Tbl_Employee where Emp_Code='P-160'}  AS Command1 APPEND (( SHAPE {select Emp_Code,Head_Name FSEHN,FSE_Amount,Sal_Month from Tbl_FSE fse join Tbl_Head th on fse.Head_ID=th.Head_ID where Emp_Code='P-160'}  AS Command2 APPEND ({select Emp_Code,Head_Name FSDHN,FSD_Amount,Sal_Month from Tbl_FSD fsd join Tbl_Head th on fsd.Head_ID=th.Head_ID where Emp_Code='P-160'}  AS Command3 RELATE Emp_Code TO Emp_Code) AS Command3) AS Command2 RELATE emp_code to emp_code) AS Command2
    With Rpt_SS.Sections("Section6").Controls
            .Item("Text46").DataMember = ""
            .Item("Text46").DataField = "Emp_Code"
            .Item("Text6").DataMember = ""
            .Item("Text6").DataField = "Emp_Name"
            .Item("Text47").DataMember = ""
            .Item("Text47").DataField = "GPF_No"
            .Item("Text1").DataMember = ""
            .Item("Text1").DataField = "Place_Office"
            .Item("Text2").DataMember = ""
            .Item("Text2").DataField = "Designation"
            .Item("Text48").DataMember = ""
            .Item("Text48").DataField = "Scale"
            .Item("Text49").DataMember = ""
            .Item("Text49").DataField = "PAN"
            .Item("Text3").DataMember = ""
            .Item("Text3").DataField = "DOJ"
            .Item("Text55").DataMember = ""
            .Item("Text55").DataField = "Pay_Level"
        End With
        With Rpt_SS.Sections("Section1").Controls
            .Item("Text9").DataMember = "Command2"
            .Item("Text9").DataField = "FSEHN"
            .Item("Text4").DataMember = "Command2"
            .Item("Text4").DataField = "FSE_Amount"
            .Item("Text5").DataMember = "Command2"
            .Item("Text5").DataField = "FSDHN"
            .Item("Text7").DataMember = "Command2"
            .Item("Text7").DataField = "FSD_Amount"
        End With

    Error message coming as " Datafield Command2.FSD_Amount not found"

    Please guide me to fix the issue.

    Thank you.


    • Edited by Gunapriyan Monday, December 10, 2018 11:22 AM Personal
    • Moved by KareninstructorMVP Monday, December 10, 2018 11:50 AM Moved from forum
    Monday, December 10, 2018 11:21 AM

All replies