This is a migrated thread and some comments may be shown as answers.

Statement of Account with Previous Balance

2 Answers 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
CEFRA
Top achievements
Rank 1
CEFRA asked on 31 May 2012, 09:05 PM

Hi good afternoon
I have a problem and how I can not solve, I'm trying to make account statement to a client, the particularity of this is that the report should take a customer's previous balance was taken into account in calculating the total of what the customer .

But as I can not do that because to calculate the customer's previous balance, I do a query that brings me the movement of transactions that the customer has not paid yet and add them in doing so I can not bring transactions customer during the time period established in the statement. Why I need 2 Data Sources for fetching a previous balance and one that brings all customer transactions.
As I can do since I'm using a SQL Server database CE 4.0 and Telerik WinForms. For my reports Others fill i use ObjectDataSource for my report in code behind like this
-------------------------------------------------------------------------------------

' Creating and configuring the ObjectDataSource component:

        Dim objectDataSource As New Telerik.Reporting.ObjectDataSource()
' GetData returns a DataSet with three tables

        objectDataSource.DataSource = vDatos.GetPagos_x_Cliente(gRep3_Cliente_id, gRep3_Fec_Ini, gRep3_Fec_FIn) 

Indicating the exact table to bind to. If the DataMember is not specified the first data table will be used.
        objectDataSource.DataMember = "GF_PAYS_FOR_CUSTOMER" '

 

        ' Assigning the ObjectDataSource component to the DataSource property of the report.

        Me.DataSource = objectDataSource

-----------------------------------------------------------------------------------

so how i use other datasource ??
I attach a picture to describe what I need.

Need help thanks

2 Answers, 1 is accepted

Sort by
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 05 Jun 2012, 09:53 AM
You can use any item that supports data-binding:
table, list
these items can have their own data-sources that can be parameterized to fetch the data for the customer you wish.
You can also use SubReport with parameters.
0
CEFRA
Top achievements
Rank 1
answered on 05 Jun 2012, 11:54 PM
Thanks for answer my question, well , i try but the same value appear for all records in the report.

i try this
http://www.telerik.com/community/forums/reporting/telerik-reporting/get-textbox-value-from-itemdatabound.aspx

my idea is populate a in codeBehind using a Datareader in the event ITEMDATABOUND i will get the balance for the ID populate in these moment

any idea ???
Tags
General Discussions
Asked by
CEFRA
Top achievements
Rank 1
Answers by
Hadib Ahmabi
Top achievements
Rank 1
CEFRA
Top achievements
Rank 1
Share this question
or