Using Visual Designer to Create a Chart

Posted by ChUIMonster on 22-Feb-2009 11:51

In my quest for answers regarding how to dynamically create a simple line chart I thought that I might perhaps try a static example using good old sports2000.

The idea is to chart CustNum along the X Axis and CreditLimit on the Y Axis.

Dumb example, perhaps, but it should be simple enough. And sports2000 just happens to already be connected.

So I create a new OpenEdge Form called "Customer".

I then drag a ProBindingSource and an UltraWinChart onto the form.

That was easy. Makes a nice demo.

But, umm, err, ah... now what? I have this idea that I should tell the bindingSource that it is somehow associated with the Customer table. But the bindingSource designer wizard thingy doesn't seem to know anything about the sports2000 tables?

Shouldn't I just be dragging the Customer table from the DB Structure tab over onto the Visual Designer and dropping it somewhere? Like maybe onto the ProBindingSource or, better yet, the UltraWinChart?

All Replies

Posted by kevin_saunders on 23-Feb-2009 03:30

Assuming I understand your question correctly:

The ProBindingSource wants you to do one of 2 things - add the fields you need manually, or use an XSD (simple to create using the WRITE-XML-SCHEMA function) to load the structure in.. If you just have 2 fields (for the X/Y on your chart) then I would do it manually.

Then, in your code, create a query against the table in question and attach it to the binding source. Attach the chart to the binding source (not that I have used this particular control, so this part is an assumption).

Posted by Admin on 23-Feb-2009 08:10

Note, i've heard that IG charts only support DataTable and do not support Prodatasets.

DataTable i think could be connected through a Progress Query.

Posted by ChUIMonster on 23-Feb-2009 08:16

Assuming I understand your question correctly:

You seem to

The ProBindingSource wants you to do one of 2 things

- add the fields you need manually, or use an XSD

(simple to create using the WRITE-XML-SCHEMA

function) to load the structure in.. If you just have

2 fields (for the X/Y on your chart) then I would do

it manually.

???

So, basically, the OEA Visual Designer doesn't know squat about the existence of a Progress database? OEA just shows some pretty eye candy called "DB Structure" but doesn't let you actually tie that into your application?

Bummer.

BTW -- I did do the create it manually thing. But that seemed so ridiculous that I started looking for ways to link together binding sources and known, existing schema. I never imagined that it was just a cruel joke.

Then, in your code, create a query against the table

in question and attach it to the binding source.

I can manage that

Attach the chart to the binding source (not that I

have used this particular control, so this part is an

assumption).

That seems to be the hard part. I cannot, for the life of me, figure out how to do that. The "wizard" has a screen that purports to help with this but it seems to want the binding source to be redundantly entered (I'm sure that I'm misinterpreting that) and does not seem to have any notion of specifying which field goes with which axis.

Posted by ChUIMonster on 23-Feb-2009 08:17

On the bright side I'm working with a simple table. No ProDataSet.

Posted by Simon de Kraa on 23-Feb-2009 08:43

There is an example "Number of Orders per Salesrep" in .\UltraControls\WinChart\Composite that might give you some ideas?

BTW

The data comes from .\UltraControls\DataServices.

Posted by ChUIMonster on 23-Feb-2009 08:49

Sounds promising.

But I don't seem to have such a directory in $DLC. Where should I be looking?

Posted by Simon de Kraa on 23-Feb-2009 08:56

You can find it in the samples directory...

For some reason the samples directory is no longer included in the OpenEdge installation but you can still find it on the documentation media.

Posted by Simon de Kraa on 23-Feb-2009 08:59

...it looks like you can find it here as well. Not sure if this is an up-to-date version though...

Posted by rbf on 23-Feb-2009 09:02

The Samples directory is installed if you install the 'Documentation and Samples'

Posted by ChUIMonster on 23-Feb-2009 09:09

Hmmm... not having this stuff installed must be a fringe benefit of paying for the PSDN SDK and then having to jump through all of those hoops to get the IF trial license installed.

Posted by Simon de Kraa on 23-Feb-2009 09:19

Ah, never even knew that! I always looks in the "old" $DLC/src/samples directory instead of $DLC/samples.

The OpenEdge Documentation and Samples CD installs these code samples into the following locations:

oedoc-samples-install-path — Where oedoc-samples-install-path is the directory where you chose to install the OpenEdge documentation. The default is C:\Progress\OpenEdge_102A_Doc.

openedge-install-dir — Where openedge-install-dir is the directory where you chose to install OpenEdge. The default is C:\Progress\OpenEdge. The samples are installed to openedge-install-dir only if you have already installed OpenEdge.

Posted by rbf on 23-Feb-2009 09:23

Hmmm... not having this stuff installed must be a

fringe benefit of paying for the PSDN SDK and then

having to jump through all of those hoops to get the

IF trial license installed.

No it has nothing to do with that. AFAIK the samples are also installed if you don't have an Infragistics license.

Posted by ChUIMonster on 23-Feb-2009 09:25

Ok, I must have screwed up the install then.

I'm sure I'll be getting a chance to try again soon enough!

Posted by Simon de Kraa on 23-Feb-2009 09:30

Nowadays the samples are only installed when you install the Documentation and Samples stuff from the OpenEdge Doc and Samples media = separate download (or copy the samples directly from the media). They are no longer included on the OpenEdge media itself.

Posted by rbf on 23-Feb-2009 09:32

Ok, I must have screwed up the install then.

I'm sure I'll be getting a chance to try again soon

enough!

You can reinstall the Documentation and Samples at any time. At any rate you need to reinstall it after you add your Infragistics license in order to get the Infragistics help.

Posted by Peter Judge on 23-Feb-2009 09:49

On the bright side I'm working with a simple table.

No ProDataSet.

Just FYI, I posted on the other charting thread that there are issues with Ultra charts and the ProBindingSource.

-- peter

Posted by ChUIMonster on 23-Feb-2009 09:55

None of the samples seem to use an actual Progress table or temp-table.

They're using stuff like:

Which is meaningless gibberish to me

Posted by Simon de Kraa on 23-Feb-2009 10:04

I think you will find the familiar temp-table stuff in the UltraControls\DataServices directory...

This thread is closed