Trouble with Detail Section Layout

6 posts, 0 answers
  1. ChuckRock
    ChuckRock avatar
    38 posts
    Member since:
    Jul 2006

    Posted 04 Feb 2014 Link to this post

    Hello,

    I have searched the forums, but can't seem to find an answer to this problem.  I'm designing a report that is a bit tricky; I'm trying to get the data to populate two sections of the report from multiple data records.  It would seem logical to have multiple detail areas that could be filled to accomplish this layout; but I can't figure out how to do this...

    I'm using the designer within Visual Studio.

    See below for a generic example.

    Sample layout using 3 data records:

    Detail Section

    Fields.Pool[From record 1]    Fields.Value0[From record 1]  
    Fields.Pool[From record 2]    Fields.Value0[From record 2]  
    Fields.Pool[From record 3]    Fields.Value0[From record 3]  

    Fields.Value1[From Record 1]    Fields.UserName[From record 1]  
    Fields.Value1[From Record 2]    Fields.UserName[From record 2] 

    Fields.Value1[From Record 3]    Fields.UserName[From record 3] 

    Thanks for taking the time to look at this; if you have any ideas on how I can accomplish this, I'd be very grateful!

    -Chuck

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 07 Feb 2014 Link to this post

    Hello Chuck,

    There is no option to add a second Detail section to the report. Instead, to achieve your scenario, you can add multiple data items (Table/List) to the report.
    For example, you can add two Table items to the report and set the same data source to both of them. The first one will display Fields.Pool and Fields.Value0 while the second one will display Fields.Value1 and Fields.UserName.

    Please, let us know if you have additional questions.

    Regards,
    Nasko
    Telerik

    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  3. DevCraft banner
  4. ChuckRock
    ChuckRock avatar
    38 posts
    Member since:
    Jul 2006

    Posted 07 Feb 2014 Link to this post

    Nasko,

    That suggestion worked wonderfully!

    Thanks so much for your help on this, i greatly appreciate it.

    -Chuck
  5. ChuckRock
    ChuckRock avatar
    38 posts
    Member since:
    Jul 2006

    Posted 07 Feb 2014 Link to this post

    Ok,  

    I guess I have one more question.  I'm having trouble binding the data to the table items.

    Here's the code I use to bind the data to the report, but I am at a loss as to where to bind the data to each table.

    Private Sub FillReport()
        Dim ConnectionString As String = WebConfigurationManager.ConnectionStrings("DBString").ConnectionString
        Dim theAdapter As MySqlDataAdapter
        Dim sql As String = "SELECT * FROM Rpt1 WHERE SystemID = " & C.UserID
        theAdapter = New MySqlDataAdapter(sql, ConnectionString)
     
        Dim Report3 As New Reporting.StatisticalReport3x
     
        Report3.DataSource = theAdapter
     
        ReportViewer1.Report = Report3 ' Individual Statistics
     
        ReportViewer1.RefreshReport()
    End Sub

    Where would I attach the correct data to the tables?  It is the same data source as the main report.  I just can't figure out how to apply the datasource to each table.

    Thanks!

    -Chuck
  6. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 12 Feb 2014 Link to this post

    Hello Chuck,

    In order to access the table items from the calling application you can proceed directly following the report hierarchy e.g.:
    Dim table As Telerik.Reporting.Table = TryCast(report.Items.Find("myTableName", True)(0), Telerik.Reporting.Table)
    table.DataSource = myDataSource

    Still our consideration is instead to use a declarative approach with the SqlDataSource that supports parameters and pass the user id with a report parameter to the report source.

    Regards,
    Nasko
    Telerik

    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  7. ChuckRock
    ChuckRock avatar
    38 posts
    Member since:
    Jul 2006

    Posted 12 Feb 2014 in reply to Nasko Link to this post

    Nasko,

    As always, you are a great help!

    Thanks so much for taking time to help me out.

    Regards,

    Chuck
Back to Top
DevCraft banner