Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 03 FEB 1998 04:57:45AM Didier Béphage didierb@bow.intnet.mu dbe@dcdmc.intnet.mu wrote:

I have to display a single chart using data from different views found in different databases. I could place each view in a resultset and then in a data object.Finally, I would have to merge the contents of all the data objects into another data object and use this as my chart source. My problem is that I can't use several data objects,since the number of databases and views involved is dynamic. I figured out the only way to do this would be to put the contents of different result sets in a single result set, use the latter to fill a data object and draw the chart.But it doesn't work. If anyone has a clue, please help.

The lines of code are shown below:

'Trying to get all values in first(source) resultset and mapping them into container result set

RowCount&=Rs.RowCount()

For counterdata1=1 to RowCount&

Set Field1=rs.Field(1)

rs.Movefirst 'moving to first row

rs.edit 'opening for editing

valuex=rs.GetValue(1)'getting value for first field in first resultset

valuey=rs.GetValue(2) 'getting value for second field in first resultset

valuez=rs.GetValue(3) 'getting value for third field in first resultset

container.NewRow 'Adding a new row to the container resultset

container.Edit 'opening the current row for editing

container.SetValue 1, valuex 'This should be in the form: 'RecordSet.SetValue(Index%, ValueV)

container.SetValue 2, valuey 'but ViP says illegal use of 'parentheses if I put them

container.SetValue 3, valuez

container.Update 'Updating the result set with the new values

rs.MoveNext 'Advancing to next row in source result set

Next counterdata1


At 04 FEB 1998 05:45PM Greg (Revelation) wrote:

I am currently working on your problem, trying work out the many methods of charting data from multiple sources. I just wanted to recommend the example given in the ViP Application Developers Guide on pages 293-294. It works very good, and it might provide some help for you if you haven't already looked at it. There is one typo in it:

Call Data3.CellSetDataFromResult (row,1,"Data1", i&,1)

should be…

Call Data3.CellSetDataFromResult (row&,1,"Data1", i&,1)

Notice the "&" behind the row. This should be done for those three call statements.


At 05 FEB 1998 12:44AM Didier Béphage wrote:

Thanks for looking at the problem Greg.

Concerning the example you mentioned in the ViP Application Developers Guide, I agree that it works very good. But it relies on one data object per view, which implies several data objects in one application window. My goal is to get these multiple data sources in a single data object, then chart them using a different style for each data series(e.g series1 - line chart, series2 - bar chart, series3…)

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/89de3e3af0aa1873852565a00036b9cf.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1