Hi,Problem in crystal report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranjana1980
    New Member
    • Jul 2008
    • 15

    Hi,Problem in crystal report

    Here Sample Of my crystal Report Using Eg
    In My crystal report,I retrieve data from two tables using sql-server using this code
    Code:
    con.ConnectionString = "Data Source=XPO3;Initial Catalog=Imsapplication;Integrated Security=True";
    con.Open();
     adp1 = new SqlDataAdapter("select * from phototab", con);
                DataSet ds1 = new DataSet();
     adp1.Fill(ds1, "phototab");
    adp2 = new SqlDataAdapter("select distinct Id,addr from addtab", con);
     adp2.Fill(ds1, "addtab");
    CrystalReport6 rp = new CrystalReport6();
     rp.Load("CrystalReport6.rpt");
     rp.SetDataSource(ds1);
     crystalReportViewer1.ReportSource = rp;
    In Table Phototab field is
    Id(Primary Key)
    Name
    Photo
    In Table addtab Field is
    Id(Foreign Key)
    Addr
    In addtab I have Multiple Id of different address
    eg Id Addr
    1 sfsf
    1 fdgsdd
    2 dgdgd
    2 fdgfdgd
    which i want to retrieve in crystal report
    for eg table record like this
    Id Qualification Univ Precentage
    1 10th Mp Board 55
    1 12th MP Board 65
    2 10th MP Board 77
    2 12th MP Board 66
    2 graduation DAVV 66
    But from above code for Each Id we get repetition of record of table one with record of table 2
    how to resolve it
Working...