Organization of sections

Posted by: jluis-dd on 4 August 2017, 2:49 pm EST

  • Posted 4 August 2017, 2:49 pm EST

    Hi!


    I need an report to display data at this way


    Med


       Generic Name


       Topic 1
          *a
          *n


       Topic 2
          *x
          *y


    How can I configure the sections of my report to display something like this (without using dinamic reporting)


    I been checking this and my only conclution is that it need subreports, it is true??


    JLuis!

  • Replied 4 August 2017, 2:49 pm EST

    I would assume a group header or two for the 'Med' and 'Generic Name', another group header for the 'Topics' and the values '*a', *'n', '*x' and '*y' in the detail section again assuming that each is a seperate record from a single recordset. But the exact layout would be dependant on your source and what all a record contains for datapoints. To really be able to answer the question, one would need to know what the recordset(s) looked like.
  • Replied 4 August 2017, 2:49 pm EST

    In fact thats not a problem because I can send the recordset in many ways, depending on the rpt's layout


    But I realized that it would be easier if I display rtf text.


    here is a copy of the rpt.


    you need a sub like this to make it work, because we need pass a connection, a RTB and a recordset to make it work!


     


    Private Sub ImprimeRPT2(SwSql As String)


          Dim Con As ADODB.Connection
          Dim rs As ADODB.Recordset
          Dim dc As ddactivereports2.DataControl
          Dim rtb1 As ddactivereports2.RichEdit


          Me.MousePointer = vbHourglass
          Set Con = New ADODB.Connection
          Set rs = New ADODB.Recordset
          Set Rpt = New ddactivereports2.ActiveReport
          Rpt.LoadLayout Trim(RutSof.LclRpt) & "Principios_Activos.rpx"
          Set dc = Rpt.Sections("Detalles").Controls("DataControl1")
          Set rtb1 = Rpt.Sections("Detalles").Controls("rtbBack")
         
          Con.ConnectionString = bdVadem.ConnectionString
          dc.ConnectionString = bdVadem.ConnectionString
          dc.Source = SwSql
          rtb1.CanGrow = True
          rtb1.SelFontName = "Arial"
          'rtb1.Height = Rpt.PageSettings.PaperHeight - Rpt.PageSettings.TopMargin - Rpt.PageSettings.BottomMargin
          rtb1.Width = Rpt.PrintWidth


          Rpt.AddNamedItem "clsVar", clsVar
          Rpt.AddNamedItem "con", Con
          Rpt.AddNamedItem "TRec1", rs
          Rpt.AddNamedItem "rtb", Me.rtbPri
          Rpt.Sections("Detalles").NewPage = ddNPNone
          DoEvents
          Rpt.Run


          FoRepVisPre.ARV.ReportSource = Rpt
          FoRepVisPre.ARV.Zoom = -1
          Me.MousePointer = vbDefault
          FoRepVisPre.Show vbModal
    End Sub


     


    If somebody need some reporting like this, dont doubt ask!


    JLuis

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels