Results 1 to 10 of 10

Thread: [RESOLVED] Q: Data Report Sub-Report?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Resolved [RESOLVED] Q: Data Report Sub-Report?

    Does Data Report supports sub-reports? i mean is it capable? coz i have 2 recordsets that the data report should have...

    Anyone encountered this? any insights of how am i going to do this? advices?

    Thanx...

  2. #2
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: Q: Data Report Sub-Report?

    Hi,

    Yes, you may assign the appropriate controls in the details section to resemble as a subreport. but embedding another data report inside a data report
    i think is not possible...I don't know with the other guys here...

    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Re: Q: Data Report Sub-Report?

    you know how to set a group header datasource programmatically? anyone?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Re: Q: Data Report Sub-Report?

    Still having problems here.. Please help!!! im almost finished with my work but not knowing how to set grouping on a datareport gives me hell of a headache.
    i searched for the topic but leads me to nothing. please help!

  5. #5
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: Q: Data Report Sub-Report?

    Hi,

    Can you post the a draft on your desired output/report?

    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Re: Q: Data Report Sub-Report?

    Solve it! Whew! I'll Paste the code here for Reference of those who will have the same problems as me.

  7. #7
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: Q: Data Report Sub-Report?

    Good job dude....

    If you'll paste the code, don't forget to put VB tags on it...


    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Re: Q: Data Report Sub-Report?

    This is i want my Report to look like...

    Group Header(Section4)---------------------

    Computer Name: Comp1
    Ip Address: Blah.blah.blah.blah

    Detail(Section1)----------------------

    Applications Used: VB
    Excel
    Etc...


    this is how i achieve this programmatically:

    vb Code:
    1. Dim str, cond As String
    2. Dim rs As New ADODB.Recordset
    3. str = "Select * from tblUsers"
    4.  
    5. 'Shaped Recordset
    6. str = "SHAPE {" & str & "} APPEND "
    7. str = str & "({SELECT * FROM qryUserApps} AS User "
    8. str = str & "RELATE UserID TO UserID) AS UserApps"
    9.  
    10.  
    11.  
    12. Dim ConnStr As String
    13. Dim Conn As New ADODB.Connection
    14. Set Conn = New ADODB.Connection
    15.  
    16. ConnStr = "Data Provider=Microsoft.Jet.OLEDB.4.0; " & _
    17.           "Provider=MSDataShape;Data Source=" & App.Path & "\Database.mdb;"
    18. If Conn.State = 1 Then Conn.Close
    19. Conn.ConnectionString = ConnStr
    20. Conn.Open
    21.  
    22. If rs.State = 1 Then rs.Close
    23. rs.Open str, Conn, 1, 3, 1
    24.  
    25. 'For the controls on the group header section,
    26. 'add a textbox and set its datafield
    27.  
    28. 'Set each Controls data members(controls which are located only on detail section of the data report)
    29. With drCmiUser.Sections("Section1").Controls
    30.     .Item("txtApplication").DataMember = "UserApps"
    31.      'UserApps is a Shaped Recordset
    32. End With
    33. 'NOTE: Dont forget to set the Controls DataField on the Data Report
    34.  
    35.  
    36. drCmiUser.Orientation = rptOrientLandscape
    37. Set drCmiUser.DataSource = rs
    38. drCmiUser.Show vbModal

    Hope this help people in the future...
    Last edited by cometburn; Feb 18th, 2008 at 11:07 PM.

  9. #9
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    398

    Re: [RESOLVED] Q: Data Report Sub-Report?

    vb Code:
    1. thanks
    ________
    Website design
    Last edited by rothj0hn; Feb 15th, 2011 at 01:24 PM.

  10. #10
    Lively Member
    Join Date
    Dec 2008
    Posts
    108

    Re: [RESOLVED] Q: Data Report Sub-Report?

    This is exactly what I'm looking for! Can you help me on this? DO I have to shape a recordset for my datareport? My question is here:

    http://www.vbforums.com/showthread.php?t=554972

    Please, please help me in the coding!

Posting Permissions

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



Click Here to Expand Forum to Full Width