Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem in parameter field Post Reply Post New Topic
Author Message
sacramento
Newbie
Newbie


Joined: 01 Oct 2008
Location: Portugal
Online Status: Offline
Posts: 19
Quote sacramento Replybullet Topic: Problem in parameter field
     Posted: 01 Oct 2008 at 3:24pm

Hi to all:

I have this code in VB that extract from listview values to CR parameter fields...I have in one listview.items 3 records that have the same value and CR returns a error when,in the cicle For Next, pass for the same value...The error is:"The value you want include is already exists"...

Can anyone tell me what is the problem?We could not have records with the same values?Wich way I can resolve this?
 
 
Dim Report As New CRAXDRT.Application
Dim Rpt As CRAXDRT.Report
Dim formula As CRAXDRT.FormulaFieldDefinition


Set Report = New CRAXDRT.Application
Set Rpt = Report.OpenReport(App.Path & "\Relatório_Aves_1selecao.rpt")

If (Rpt.HasSavedData) Then Rpt.DiscardSavedData

Rpt.EnableParameterPrompting = False

For s = 1 To ListView1(1).ListItems.Count

Rpt.ParameterFields(1).AddCurrentValue (ListView1(1).ListItems.Item(s))
Rpt.ParameterFields(2).AddCurrentValue (ListView1(1).ListItems.Item(s).SubItems(1))
Rpt.ParameterFields(3).AddCurrentValue (ListView1(1).ListItems.Item(s).SubItems(2))
Rpt.ParameterFields(4).AddCurrentValue (ListView1(1).ListItems.Item(s).SubItems(3))
Rpt.ParameterFields(5).AddCurrentValue (ListView1(1).ListItems.Item(s).SubItems(4))
Rpt.ParameterFields(6).AddCurrentValue (ListView1(1).ListItems.Item(s).SubItems(5))


Next


setviewersize

CRViewer1.ReportSource = Rpt

CRViewer1.ViewReport

 
 
Thanks
IP IP Logged
sacramento
Newbie
Newbie


Joined: 01 Oct 2008
Location: Portugal
Online Status: Offline
Posts: 19
Quote sacramento Replybullet Posted: 04 Oct 2008 at 10:24am
Hi:
 
The "Guru's" of CR don't have a answear to this?
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum