473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Quite difficult: Crystal_Report.datasource = ArrayList

Hello,

On my aspx page (VS.NET-2003), I am using a Repeater control, which is
binded with an ArrayList:

Dim arrAfiliado As New ArrayList
' Initializing dr as DataReader
' Then looping dr
Do While dr.Read
iCod_Op = dr.Item("cod_op").ToString()
oAfiliado = New Afiliado(sCod_DNI, iCod_Op)
arrAfiliado.Add(oAfiliado)
Loop

' As you see, at the end I have an ArrayList of an object called
oAfiliado.
' Then I bind Repeater control with that ArrayList

Repeater1.DataSource = arrAfiliado
Repeater1.DataBind()

On the aspx page, I display properties like: oAfiliado.Afil_Name

<td width="10%"><b>Afil Name :</b></td>
<td width="60%"><%# Container.DataItem.Afil_Name%></td>
<td width="10%"><b>Tipo :</b></td>

' Now I need to print that ArrayList of oAfiliado object using Crystal
Reports.
' Name of Crystal Report: CR_Afiliado.rpt
' The fields of my Crystal Report are designed based on an XML Schema
..xsd like:

<xs:schema id="XML_Afil"
targetNamespace="http://tempuri.org/XML_Afil.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/XMLDetalleAfil.xsd"
xmlns:mstns="http://tempuri.org/XML_Afil.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Afil">
<xs:complexType>
<xs:sequence>
<xs:element name="Afil_Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

On code behind:

Dim oRpt As New CR_Afiliado
oRpt.SetDataSource(arrAfiliado)

However, even that Repeater1 displays record, my CrystalReport doesn't
show any record and no error.
Has anybody dealt with the same problem, binding a Crystal Report with
an ArrayList of objects instead of a DataTable or DataSet?

Thank you!

Jan 16 '07 #1
0 931

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: DraguVaso | last post by:
Hi, I need a function that gives me the number of Columns shown in a DataGrid. So I don't need to know the number of columns shown in tha DataSource, because this number can be completely...
0
by: Jesse Martinez | last post by:
My problem occurs when I use an ArrayList as a ListBox.DataSource. When the ArrayList attached to the Listbox is not empty the Listbox behave normal without problem, but if I remove all items...
2
by: Luca | last post by:
Hello, I'm using a windows form in which there is a standard ListBox control. I want to add/remove objects from the ArrayList associated to the ListBox, and I want the ListBox immediately shows...
2
by: cj | last post by:
I have a ComboBox that I populate using a DataSource (an ArrayList of objects of the same type.) When I add and remove items in the data source array list, I can't get the list of items shown in...
2
by: Alan Silver | last post by:
Hello, I am using a repeater on a page, and on postback would like to get hold of the ArrayList that I used to populate the repeater. I thought that I should be able to do something like... ...
4
by: Stephen | last post by:
IN VB.NET I have a form with a ListBox and would like to set the DataSource property at design-time but I can't seem to declare any kind of variable that will show up in the list. I have tried a...
1
by: WhiteWizard | last post by:
First my apologies, this may be longer than the normal question. I have a windows app (.NET 2.0, VS2005), and I've written a user control that will allow the user to "drag and drop" a directory...
1
by: MrNobody | last post by:
I have a ComboBox on my form, and I set it's DataSource to an ArrayList of custom objects. Everything loads fine, all the entries I initially loaded into the ArrayList appear in my ComboBox. ...
1
by: Refugnic | last post by:
I tried to fill a ListBox with a DataSource pointing to an ArrayList. It all works fine...up to one point. The ArrayList is dynamic, which means the contents of it change, during the course of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.