ActiveReport From The Listview

Posted by: webing on 4 August 2017, 3:19 pm EST

  • Posted 4 August 2017, 3:19 pm EST

    Hi;

    I write a program with Visual Basic, hang Had a problem.

    I want to transfer my data inside a listview ActiveReport.



    I could not reach a conclusion with an example of writing code.



    -/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/



    Private Sub ActiveReport_DataInitialize()

    Fields.Add "TARIH"

    Fields.Add "CINSI"

    Fields.Add "MIKTAR"

    End Sub



    Private Sub ActiveReport_FetchData(EOF As Boolean)

    For Say = 1 To HesapDefteri.ListView1.ListItems.Count

    Fields("TARIH").Value = HesapDefteri.ListView1.ListItems(Say).Text

    Fields("MIKTAR").Value = HesapDefteri.ListView1.ListItems(Say).SubItems(3)

    Next

    End Sub

    /-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/



    PrintScreen sending an application to describe my problem better.





    Please Help!

    Thanks



  • Replied 4 August 2017, 3:19 pm EST

    Hello,

    Please try using code as follows

    Private Sub ActiveReport_FetchData(EOF As Boolean)

    If Say=HesapDefteri.ListView1.ListItems.Count Then
      EOF=True
    Else
      EOF=False
      Fields("TARIH").Value = HesapDefteri.ListView1.ListItems(Say).Text
      -----------------------------------------------------------------
      Say=Say+1  
    End IF
    End Sub

    Regards,
    Prantik
  • Replied 4 August 2017, 3:19 pm EST

    Hello;



    Very thank for answer



    Sample Code with my project adapted the religion you provide a small correction.



    ListView I use two different project. When I run the reporting codes, ActiveReport count on the same line equalizing.



    Description PrintScreen can also see the problem.

  • Replied 4 August 2017, 3:19 pm EST

    How can I solve this problem?



    Please Help!
  • Replied 4 August 2017, 3:19 pm EST

    Hello,

    Are the fields on the left hand of the screenshot in the listview and those on the right hand side are the same.If this is the case, then you would need to add only fields TARH,CINSI,MIKTAR,KURU,AKILAMA to the report and also only 5 controls corresponding to these fields in the detail section.Then please set the columncount of the detail section to 2 and the columndirection to accross-down.

    Regards,
    Prantik
Need extra support?

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

Learn More

Forum Channels