Query result in portal

Hi,

Is there a possibilty to put the result of a query in a tableview or portal.

I have a query with GROUP BY part and SUM-fields and I want to show the result in a tableview or portal.
What I do now is that I make a HTML-table and fill this HTML-table with the query result.

But if there is a way to link a dataset to a portal or form (tableview), then it would save me lot of programming.

Because as far as I can see forms must be linked to a dataprovider, and that is not what I want here.

Basicly I want to show the result of a query in a grid.

Does Servoy has such possibily or is there a plugin/bean that can handle that?

Martin

Martin,

The dataset.createDataSource() method in Servoy 4.1 provides this functionality.
You can create a form in the solution model with the data source uri returned, just search the forum for a few examples.

Rob

I was actually searching for the post Jan Aleman did with an example of this feature to reply to this post.
Here it is:

viewtopic.php?f=1&t=11505#p57322

but in 3.5.x…

Is it a possibility to use the InMemDataGrid bean?

rgansevles:
Martin,

The dataset.createDataSource() method in Servoy 4.1 provides this functionality.
You can create a form in the solution model with the data source uri returned, just search the forum for a few examples.

Rob

ROCLASI:
I was actually searching for the post Jan Aleman did with an example of this feature to reply to this post.
Here it is:

http://forum.servoy.com/viewtopic.php?f … 505#p57322

Thanks Rob, Robert,

Good to see that it can work like this. Unfortunately I need the functionaliteit in 3.5, so this way of creating grids will be for later when migration to 4.1.x is done.

Martin

mboegem:
but in 3.5.x…

Is it a possibility to use the InMemDataGrid bean?

Hi Marc,

I’ve seen this bean, but when I looked at the methods and properties I didn’t see a way to link a dataset to this bean

Martin

martinh:

mboegem:
but in 3.5.x…

Is it a possibility to use the InMemDataGrid bean?

Hi Marc,

I’ve seen this bean, but when I looked at the methods and properties I didn’t see a way to link a dataset to this bean

Martin

In 3.5.x you can use the InMemDataGrid bean but remember that it will not work in WebClient.
As for how to use it. The beans takes the Swing TableModel object.
You can use the getAsTableModel() function on a dataset to get this object.

Hope this helps.

ROCLASI:
In 3.5.x you can use the InMemDataGrid bean but remember that it will not work in WebClient.
As for how to use it. The beans takes the Swing TableModel object.
You can use the getAsTableModel() function on a dataset to get this object.

Hope this helps.

Good points Robert,

It need to work in webclient also. So that limits the possibilities.
I tried also dataset.getAsHTML(), but then it is not formatted like I would like it to see (some columns need to be right aligned; 2 decimal digits, no borders)
So for the moment I’ll create the HTML myself.

When I’m migrated to 4.1.x then I’ll use example that was given in a previous posting. It looks like that I can do all I want.

Martin