Repeating Data

Stimulsoft Reports.WEB discussion
Post Reply
raj07
Posts: 21
Joined: Fri Feb 13, 2009 1:16 am
Location: Mumbai

Repeating Data

Post by raj07 »

Hi.. currently i am getting data like

,Apple,banana,Orange,Apple,,Orrange,Grapes,Mango,Guva,,Apple,Orrange

in my data table there are some null value wich also printing and some repeated value also getting printed.
i want to remove the Blank Data and the Repeating data from the Detail... how can i print my data just single like this..

Apple,Orange,Guva,Grapes,Banana

plzz do reply need help...
Thank You.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Repeating Data

Post by Jan »

Hello,

You can use hashtable to hide duplicated values.

Thank you.
raj07
Posts: 21
Joined: Fri Feb 13, 2009 1:16 am
Location: Mumbai

Repeating Data

Post by raj07 »

but whare should i put Hashtable

in the Datasource or TextField of data printing..

explain it iwth proper....plzz Thank oYou
raj07
Posts: 21
Joined: Fri Feb 13, 2009 1:16 am
Location: Mumbai

Repeating Data

Post by raj07 »

hii.. JAN what happen y r u not replyinn....??
plzz reply... :dumb:
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Repeating Data

Post by Jan »

Hello,

You can use following code:

Code: Select all

Me.Categories.First
    Dim hashtable As New System.Collections.Hashtable
    Do While Not Me.Categories.get_IsEof
        hashtable.Item(Me.Categories.CategoryName) = Me.Categories.CategoryName
        Me.Categories.Next
    Loop
    Dim str As String = ""
    Dim obj2 As Object
    For Each obj2 In hashtable.Keys
        If (str = "") Then
            str = obj2.ToString
        Else
            str = (str & ";" & obj2.ToString)
        End If
    Next
    e.Value = str
Thank you.
Post Reply