help in relation please

Posts   
 
    
mahm9
User
Posts: 11
Joined: 10-Mar-2009
# Posted on: 07-Apr-2009 11:57:34   

i building report with crystal report and work very good with llblgen pro but with one table only now i want to make report binding data from more table how made relation between table and send data to report

please simple example thanks

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 07-Apr-2009 12:15:15   

This has been discussed severa times before. Please search the forum for 'Crystal reports' (without the single qoutes). Please post back here if you didn't find what you are looking for.

mahm9
User
Posts: 11
Joined: 10-Mar-2009
# Posted on: 07-Apr-2009 20:14:53   

السلام عليكم first of all thanks about response but my brother i search about any example for reporting from more than table but i am not find so this the solution for single table


Dim rpt As New ReportDocument
            Dim fileName As String = Server.MapPath("entdab_dakhli1.rpt")
            rpt.Load(fileName)
            '-------------------------------------------------------------------------------
            Dim col As New EntedabMonyCollection
            Dim selectFilter As New PredicateExpression
            Dim sorter As SortExpression
            Dim ahwalid As New TextBox
            ahwalid.Text = 1
            If Not [String].IsNullOrEmpty(ahwalid.Text) Then
                selectFilter.AddWithAnd(EntedabMonyFields.EntedabType = ahwalid.Text)
            End If
            If Not [String].IsNullOrEmpty(TextBox5.Text) Then
                selectFilter.AddWithAnd(EntedabMonyFields.DeputStart >= TextBox5.Text)
            End If
sorter = Nothing

            Dim dt As DataTable = EntedabMonyCollection.GetMultiAsDataTable(selectFilter, 0, Nothing)
            rpt.SetDataSource(dt)

            CrystalReportViewer1.ReportSource = rpt

this code work fine with single table but i do not know how to to make it work with multi table

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 07-Apr-2009 21:35:37   

You need to use "Relations" to join the tables you need. See the documentation about using dynamic lists

Matt