Datasource and DataBinding |
Post Reply |
Author | |
Phoenix999
Newbie Joined: 26 June 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 26 June 2009 at 8:07pm |
New user of Codejock (v13).
I am having trouble understanding whether the datasource property once set from an ADO data sourse should display the data or not.
The header columns get the correct labels but no data is showm
I have looked through the forums and note there are a few questions of this type BUT no answer forthcoming. Is this supported?
I have other controls that once the datasource is set that is all that is reqiored to display the data.
So does Codejock work this way? Or do you have to request row by row from the datasource and manually display the date. Is dso seems to defeat the purpose
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Hi,
Have you seen the sample released by CJ ?
You can find it on your installation folder in :
In my opinion, this example should be included in the start menu shortcuts ... |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Phoenix999
Newbie Joined: 26 June 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Maybe I am missing something here.
I have another control where once a datasource is attached it needs no other code to populate header and columns with correct alignment etc based on the data type. The ReportControls DataSource I just don't get. Once attached you still need to iterate to create columns Seems to defeat the purpose of the DataSouce. Am I missing the way this is used? There is no automatic poulation correect? |
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP and Vista (32bit) - SP 2 Language: Visual DataFlex 15 |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Did you see the sample ?
Example :
' Open Recordset
Rs.CursorLocation = adUseClient Rs.Open "select * from " & "[" & Table & "]", Con ' Data binding
Set wndRecords.DataManager.DataSource = Rs wndRecords.DataManager.DataBind |
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Phoenix999
Newbie Joined: 26 June 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Yes I saw the sample and And that is exactly what I am doing.
However all I get is the header row with the column names-there is no data being shown. Someone else has asked the same question on this forum and got no answer. So are you saying that the data should be shown automatically? If so then it isnt happening for me- hence the original question. |
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP and Vista (32bit) - SP 2 Language: Visual DataFlex 15 |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Absolutly ! It's the meaning of databinding :)
If you run the sample app made by codejock (without changing something), did you have only the columns headers ?
If yes, can you make a sample with some data that isn't working for you ?
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Phoenix999
Newbie Joined: 26 June 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Ok Firstly I am using Visual DataFlex as my info shows so a sample would be a waste of time.
Now sorry to labour on this but I am trying to get this working as I expect it should. Now the code in the sample is: Private Sub ShowRecords(Table as String) ' show records If not Rs.State = adStateClosed Then Rs.Close ' Rs.CursorType = adOpenStatic Rs.CursorLocation = adUseClient Rs.Open "select * from " & "[" & Table & "]", Con Set wndRecords.DataManager.DataSource = Rs wndRecords.DataManager.DataBind <----- databind here what is the rest of this code doing? ' add empty header row wndRecords.PaintManager.HeaderRowsDividerStyle = xtpReportFixedRowsDividerOutlook wndRecords.HeaderRecords.DeleteAll wndRecords.PopulateHeaderRows Dim Record as ReportRecord Set Record = wndRecords.DataManager.CreateEmptyRecord If Record is Nothing Then Exit Sub Dim HeaderRecord as ReportRecord Set HeaderRecord = wndRecords.HeaderRecords.Add Dim i as Integer For i = 0 to Record.ItemCount - 1 HeaderRecord.AddItem Record.item(i).Value Next wndRecords.ShowHeaderRows = True wndRecords.HeaderRowsAllowEdit = True wndRecords.PopulateHeaderRows Set Record = Nothing This appears to me that there is more than just setting the Datasource property to allow the data to display. Is this correct? |
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP and Vista (32bit) - SP 2 Language: Visual DataFlex 15 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
If you are using a VB6 datasource class as your datasource, the CJ RC doesn't support it.
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Phoenix999
Newbie Joined: 26 June 2009 Status: Offline Points: 8 |
Post Options
Thanks(0)
|
I am using ADO
|
|
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP and Vista (32bit) - SP 2 Language: Visual DataFlex 15 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
For ADO should be fine (at least in known environments - may be Dataflex have some restrictions?)
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |