I was thinking in show some data in an Oracle database in a Report widget, however I'm thinking how to get it.
First, let's assume I have configured a connector with JDBCAdapter using SEC, (That's in process).
Now, let's guess I have a CAPI which is using the JDBC connector and is returning a result in the form mentioned in the doc:
{
"SECStatus":200,
"DBData":{
"result":"success",
"data":[
{"birth":"1996-02-05","death":"2010-06-06","name":"Pancho","owner":"Malcolm","specie":"dog"},
{"birth":"1999-04-09","death":"2012-08-09","name":"Skeff","owner":"Malcolm","specie":"dog"},
{"birth":"2012-03-01","death":null,"name":"Tuffy","owner":"Axel","specie":"hamster"}
],
"rows":3
}
}
(for example)
Now, How can I set this data into a report widget?
I've tried building my own data an using setData method but I'm not sure how to configure de report widget.
I fear a JS report will be needed, but I would like to know if is there another solution.
I read an option saving and querying the results into a custom List, but I'm getting lost with this option, because it's still confusing for me on how to fill the widget report.
So, I would appreciate some advice or help in this issue.
Thanks in advance and regards.
I've got to fill a report widget with data stored in an Oracle BD.
In order to getting it I have needed to create a CAPI with two activities:
In the first one, I take the report options (sortedColumns, queryFilters, etc.) for building a string with the appropiate SQL query, and in the second one I call a connector using SEC, for making the builded query to my Oracle database. I think the concept is right, however, I'm having some troubles with the report pagination.
I'll try to explain my problem:
Let's guess that my SQL query returns 104 results, for example. I've specified that the number of elements shown on each widget page is 20, so the first page I see in the report says "1-20 / 104" which seems to be correct, but if I click in the simple arrow at right to view next page, then the report says "21-40 / 84" instead of "21-40 / 104". I think this is because I've set the following:
var reportOptions = {
count:parseInt(P_computed.count),
first:P_first,
pagerCount: parseInt(P_computed.count)
};
where P_computed.count is the number of results returned from the CAPI.
Here are some examples of the SQL I'm building:
- SELECT * FROM (SELECT t.*, rownum r FROM J3_KEYED_REFERENCE t ) WHERE r > 0
- SELECT * FROM (SELECT t.*, rownum r FROM J3_KEYED_REFERENCE t WHERE KEY_NAME like '%uddi%' ORDER BY CATEGORY_BAG_ID desc) WHERE r > 0
- SELECT * FROM (SELECT t.*, rownum r FROM J3_KEYED_REFERENCE t WHERE KEY_NAME like '%uddi%' AND KEY_VALUE NOT like '%xml%' ORDER BY CATEGORY_BAG_ID desc) WHERE r > 20
Besides If I continue viewing next pages I see
"41-60 / 84",
"61-80 / 80" (please, note that, following the sequence it should be "61-80 / 64", which is nosense)
So I think there is an internal comprobation which checks if indexes have
crossed each other and then it stops the pagination and sets the total number to the highest number of the actual results.
So...
What I need is...
How can I paginate this widget?
How ca I get a report filled with Oracle data and having good pagination?
Thanks in advance and regards
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/73378858-492a-4c90-8158-8f973032f2af%40runmyprocess.com.--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.