0 Replies - 342 Views - Last Post: 10 December 2018 - 04:39 AM Rate Topic: -----

#1 gunapriyan   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 16-September 12

Bind multiple tables values in Data Report

Posted 10 December 2018 - 04:39 AM

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 the tables as attachment1;

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

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

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

Attached image(s)

  • Attached Image
  • Attached Image


Is This A Good Question/Topic? 0
  • +

Page 1 of 1