dcsimg
Results 1 to 2 of 2

Thread: Bind multiple tables values in Data Report

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2010
    Posts
    57

    Bind multiple tables values in Data Report

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

    Please find my tables and values as below;

    Name:  Tables.jpg
Views: 75
Size:  30.0 KB

    Please find the dataraport design which i want to display to the end user as follows;

    Name:  Data Report Output.jpg
Views: 74
Size:  18.1 KB

    I read some forum that can be achieved using DATASHAPE and I had tried as follows;

    Code:
    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.

    Guna
    Last edited by gunapriyan; Dec 8th, 2018 at 05:11 AM.

  2. #2

    Thread Starter
    Member
    Join Date
    Aug 2010
    Posts
    57

    Re: Bind multiple tables values in Data Report

    Friends,

    Please reply.

    Thanks & Regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width