Results 1 to 4 of 4

Thread: Send Values to an Rpt from a ListView

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Send Values to an Rpt from a ListView

    Hi:

    I want to send values that I have in a listView object,to a report and I have try this:

    Code:
    Dim Report As New CRAXDRT.Application
    Dim Rpt As CRAXDRT.Report
    
    
    Set Report = New CRAXDRT.Application
    Set Rpt = Report.OpenReport(App.Path & "\Super8-ClassificacaoFinal.rpt")
    
    
    For s = 1 To FrmSuper8.ListView1(1).ListItems.Count
    
    Rpt.ParameterFields(1).AddCurrentValue (FrmSuper8.ListView1(1).ListItems.Item(s))  
    Rpt.ParameterFields(2).AddCurrentValue (FrmSuper8.ListView1(1).ListItems.Item(s).SubItems(2))  
    Rpt.ParameterFields(3).AddCurrentValue (FrmSuper8.ListView1(1).ListItems.Item(s).SubItems(3))  
    
    Next
    
    CRViewer1.ReportSource = Rpt
    
    CRViewer1.ViewReport
    But the report only show the last value...

    Any help please?

    Thanks

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2004
    Posts
    1,414

    Re: Send Values to an Rpt from a ListView

    Hi:

    I have the parameter field "nome" in the section detail in my Rpt,and setting for multiple values,but the code bellow only extract to rpt the first line...(London)
    Can anyone tell me what is wrong?
    Should extract the 3 lines and present in Rpt no?

    Code:
    Dim Report As New CRAXDRT.Application
    Dim Rpt As CRAXDRT.Report
    
    Set Report = New CRAXDRT.Application
    Set Rpt = Report.OpenReport(App.Path & "\Super8-ClassificacaoFinal.rpt")
    
    Rpt.ParameterFields.GetItemByName("nome").AddCurrentValue "London"
    Rpt.ParameterFields.GetItemByName("nome").AddCurrentValue "Sydney"
    Rpt.ParameterFields.GetItemByName("nome").AddCurrentValue "Hong Kong"
    
    CRViewer1.ReportSource = Rpt
    
    CRViewer1.ViewReport

    Thanks

  3. #3
    Member
    Join Date
    May 2009
    Posts
    55

    Re: Send Values to an Rpt from a ListView

    Can I do a same way to display a DataReport by clicking on ListView Item ?

  4. #4
    Member
    Join Date
    May 2009
    Posts
    55

    Re: Send Values to an Rpt from a ListView


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