Dynamically Generating Charts
I need to be able to generate charts in APEX 3.01 from a SQL query which doesn't exist until it's built at runtime.
The query is of the form:
SELECT null link, x label, count(*) value FROM y table GROUP BY label, value ORDER BY 3 DESC
x and y are the dynamically generated bits. I build the query using a PL/SQL anon block:
DECLARE
myquery VARCHAR2(4000);
BEGIN
myquery := 'select null link,';
myquery := myquery || :P39_MYCHARTQUERY;
myquery := myquery || ' label, count(*) value from ';
myquery := myquery || :P39_MYCHARTTABLE;
myquery := myquery || ' group by label, value';
myquery := myquery || ' order by value desc';
htp.print(myquery);
END;
The problem is, APEX charts will only accept a straight SQL query, not a PL/SQL block. I've tried putting the block into a hidden field (Display as Text, PLSQL version) and referencing it using substitution strings (&variable_name. style), but this doesn't seem to work. APEX is complaining about my generated SQL query:
"Error in rendering chart: ORA-06561: given statement is not supported by package DBMS_SQL"
The SQL looks correct. I have no idea what the problem is. Can anyone help?
That's an interesting blog post. I'll have to dig around in SQL Workshop to see how to implement it. Modifying it to be multi-variable looks like it shouldn't be too difficult. Teaching myself about what packages are and how to use them will be the hard part.
Similar Messages
-
Using Repeater to generate dynamic line charts
I have a call to a webservice that returns an array of
arrays. The outside array relates to the "YEAR", and the inside
arrays have 1 element for each "MONTH". I want to create a line
chart that has a line for each year, with the x-axis having months
across the bottom.
I can create this just fine by coding the appropriate number
of mx:LineSeries tags in my code.
However, I have a case where the data that I get back from
the webservice could have up to 5 years (I'm only coding for 3).
So, I'd like to find a way to dynamically generate an mx:LineSeries
instance for each one of these years. I can't seem to get this to
work with using a Repeater.
This code isn't mine (got it from the docs), but it matches
with what i'm trying to do exactly:
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import mx.charts.events.ChartItemEvent;
import mx.collections.ArrayCollection;
[Bindable]
public var expenses_2005:ArrayCollection = new
ArrayCollection([
{Year: 2005, Expense: "Taxes", Amount: 2000},
{Year: 2005, Expense: "Gas", Amount: 100},
{Year: 2005, Expense: "Food", Amount: 200}
[Bindable]
public var expenses_2006:ArrayCollection = new
ArrayCollection([
{Year: 2006, Expense: "Taxes", Amount: 2500},
{Year: 2006, Expense: "Gas", Amount: 400},
{Year: 2006, Expense: "Food", Amount: 300}
[Bindable]
public var expenses:ArrayCollection = new ArrayCollection([
expenses_2005,
expenses_2006
]]></mx:Script>
<mx:LineChart dataProvider="{expenses}"
showDataTips="true">
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{expenses.getItemAt(0)}"
categoryField="Expense" title="Expense"/>
</mx:horizontalAxis>
<mx:verticalAxis>
<mx:LinearAxis displayName="Amount"/>
</mx:verticalAxis>
<mx:series>
<mx:LineSeries xField="Expense" yField="Amount"
displayName="2005" dataProvider="{expenses.getItemAt(0)}"/>
<mx:LineSeries xField="Expense" yField="Amount"
displayName="2006" dataProvider="{expenses.getItemAt(1)}"/>
</mx:series>
</mx:LineChart>
</mx:Application>
How can I now change this to dynamically build the necessary
numbers of LineSeries?Hi jsevlie,
What I usually do in this case is to create multiple
LineSeries objects in ActionScript as soon as I get in the data.
Here is some code to get you started:
private var theChart:ColumnChart = new ColumnChart;
function drawGraph(){
this.theChart.dataProvider = this.theData;
var ctgAxis:CategoryAxis = new CategoryAxis();
ctgAxis.dataProvider = this.theData;
ctgAxis.categoryField = "0";
this.theChart.horizontalAxis = ctgAxis;
var series:Array = new Array();
for(var i:int=0; i < this.columnSpan; i++){
var colSeries:ColumnSeries = new ColumnSeries();
colSeries.yField = String(i+1);
if(i==0){
colSeries.displayName = "Revenue";
colorSrs(colSeries, 0x3F48F3);
else if(i==1){
colSeries.displayName = "Profit";
colorSrs(colSeries, 0xE9C836);
else{
colSeries.displayName = "Cost";
colorSrs(colSeries, 0x6FB35F);
series
= colSeries;
this.theChart.series = series; -
Hi there,
i am a jsp novice and i am looking to generate chart using data in a dbase. can anyone point me in the right direction how to use JChart(in jsp) to generate chart from a database? I am looking to generate Barcharts and Line charts.
it is my first attempt and i do not know where to start from. Any help would be greatly appreciated.
thanks
ravikiran
mail : [email protected]hai man,
will generating of the graphs take time... what will be the execution tie of a graph... for example if i want to generate the work performance of a team from the performance sheet i have and wanted it to be dynamically displayed( how much time it will take) since when I am doing the same in excel it is taking around 5 minutes to display the graph.will it take the same time when i use the technologies that were mentioned here ...
i need ur help is it possible to generate the graphs online with dynamic data.
SUGGEST ME ABOUT PROCEEDING FURTHER..
THANKS
RAVI -
Hi,
we are trying to develope a dynamic column chart .but i faild to achived this can any one know how to create a dynamic column chart .some sample code
i am providing.
var arrCol:ArrayCollection=new ArrayCollection();
var ob:Object;
for(var l:int=0;l<4;l++)
ob=new Object();
if(l==0)
ob["month"]="January"
ob['category']="diesel Expense";
}else if(l==1)
ob["month"]="Feb"
ob['category']="stationary Expense";
ob["category_head"]="Generator";
else if(l==2)
ob["month"]="March"
ob['category']="Light Bill Expense";
ob["category_head"]="Generator";
else if(l==3)
ob["month"]="april"
ob['category']="security Expense";
ob["category_head"]="Generator";
arrCol.addItem(ob);
//*********** stackedColumnChart is my columnchart object
stackedColumnChart.dataProvider=arrCol;
xAxis.categoryField="month"
var columnSet:ColumnSet = new ColumnSet();
columnSet.type = "clustered";
var columnSeries:ColumnSeries;
var seriesArray:Array = new Array();
for(var i:int = 0; i < arrCol1.length; i++){
columnSeries = new ColumnSeries();
columnSeries.yField = arrCol1[i].category ;
columnSeries.displayName = arrCol1[i].category;
seriesArray.push(columnSeries);
// Alert.show("ff"+ arrCol[i].category);
} columnSet.series = seriesArray;
stackedColumnChart.series = [columnSet];
this code is showing legend properly but does not create any column chart.
please help it urgent......
thanksWhich connection you are using?
IF quite difficult if you are working under static data. -
Acessing dynamic generated checkBoxes
Hello:
I have a page with a unknown number of checkBoxes
<af:forEach var="chart" items="#{row.charts}">
<af:panelGroup type="horizontal" inlineStyle="text-align:center;">
<af:outputText value="#{chart.week}"/>
<af:selectBooleanCheckbox id="chartweek"/>
</af:panelGroup>
</af:panelGroup>
</af:forEach>
Since these are dynamic generated, i don't have any back-end counterparts, so what i want is to access a array of all the checkBox components in order to see if they are checked and if they are to get their ID?
So my question is, how can i get all components on a Form from the back-end Java code?
Thanks a lot.I am trying to use the selectManyCheckBox and can't figure it out. I tried using the same type of logic as the SelectManyShuttle in the srdemo, but can't get it to work. The checking of values works (those get populated is my list of selected), but the unchecking doesn't seem to happen (even after unchecking they show up in my list of selected). How did you build the list of booleans?
Thanks,
Doug -
Making a dynamically generated field as Read Only
Hi All,
I am extending a standard CO and in that I wanted to make an entire table as read only. I checked by personalizing the page from front end, but as the items are dynamically generated fields , they are not visible in personalize page.
So is there any way to cach these fields and make them read only programmatically.
Thanks,
SrikanthHi Pratap,
I have looked into the view source and took the name of a input type ( There is no ID for the field) and used it in findIndexedChild, but it returns a null. I guess this is happening is the current CO is a mere region level CO and it is not being given the access.
The code in the class file is as follows :
public static void processTable(OAPageContext oapagecontext, OAWebBean oawebbean)
oapagecontext.startTimedProcedure("CrossTableCO", "processTable");
String s = null;
String s1 = null;
int i = oawebbean.getIndexedChildCount();
String as[[][]] = new String[7];
int j = 0;
String as1[[][]] = new String[i][6];
for(int k = 0; k < oawebbean.getIndexedChildCount(); k++)
UINode uinode = oawebbean.getIndexedChild(k);
if(!(uinode instanceof OAMessageStyledTextBean))
continue;
OAMessageStyledTextBean oamessagestyledtextbean = (OAMessageStyledTextBean)uinode;
if(oamessagestyledtextbean.isRendered())
oamessagestyledtextbean.setRendered(false);
oamessagestyledtextbean.setAttributeValue("benCustomBeanRender", "Y");
if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
s1 = oamessagestyledtextbean.getLabel();
continue;
if(s == null)
s = oamessagestyledtextbean.getViewUsageName();
as[j][0] = oamessagestyledtextbean.getViewAttributeName();
as[j][1] = oamessagestyledtextbean.getSortByAttributeName();
as[j][2] = oamessagestyledtextbean.getLabel();
as[j][3] = oamessagestyledtextbean.getExportByViewAttrName();
as[j][4] = oamessagestyledtextbean.getDestination();
as[j][5] = oamessagestyledtextbean.getUINodeName();
as[j][6] = oamessagestyledtextbean.getDataType();
if(as[j][4] != null && as[j][5] != null)
as1[j][0] = as[j][5];
as1[j][1] = as[j][0];
as1[j][2] = s;
as1[j][3] = as[j][4];
as1[j][4] = as[j][6];
as1[j][5] = as[j][3];
j++;
continue;
if("TotalPlanLabel".equals(oamessagestyledtextbean.getUINodeName()))
s1 = "XXHideXXTotalXX";
oawebbean.setAttributeValue("CrossTableUpdateInfo", as1);
oawebbean.setAttributeValue("CrossTableRenderCount", Convert.getString(j));
if(s == null)
return;
OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject(s);
if(oaviewobject == null || !oaviewobject.isPreparedForExecution() || oaviewobject.first() == null)
return;
} else
oawebbean.addIndexedChild(createTable(oawebbean, oaviewobject, as, j, s1));
oawebbean.setAttributeValue("CrossTableRowCount", Convert.getString(oaviewobject.getRowCountInRange()));
oapagecontext.endTimedProcedure("CrossTableCO", "processTable");
return;
private static UINode createTable(OAWebBean oawebbean, OAViewObject oaviewobject, String as[][], int i, String s)
int j = oaviewobject.getRowCountInRange();
DataTextNode datatextnode = new DataTextNode(new DataBoundValue("text"));
String as1[] = new String[j + 1];
CrossTableData acrosstabledata[] = new CrossTableData[i];
int k = -1;
for(int l = 0; l < i; l++)
acrosstabledata[l] = new CrossTableData(new CrossTableCellData[j + 1]);
for(int i1 = 0; i1 <= j; i1++)
if(i1 > 0)
try
if(s != null && j > 1 && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
as1[i1] = s;
else
as1[i1] = (String)oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("Name");
catch(Exception exception)
datatextnode = null;
as1[i1] = "";
if(k < 0 && j > 1 && "XXHideXXTotalXX".equals(s) && CT_NUM_MINUS_ONE.equals(oaviewobject.getRowAtRangeIndex(i1 - 1).getAttribute("GroupOiplId")))
k = i1;
for(int j1 = 0; j1 < i; j1++)
if(i1 == 0)
acrosstabledata[j1].getData()[i1] = new CrossTableCellData(as[j1][2]);
else
acrosstabledata[j1].getData()[i1] = new CrossTableCellData(null, as[j1][2], oaviewobject, i1 - 1, as[j1][0], as[j1][1], as[j1][3], as[j1][4], as[j1][5], as[j1][6]);
TableBean tablebean = new TableBean("CrossTable", new ArrayDataSet(acrosstabledata), null, null, datatextnode, new ArrayDataSet(as1, "text"));
tablebean.setWidth("100%");
tablebean.setSummary(" ");
tablebean.setNameTransformed(false);
tablebean.setTableFormat(new DictionaryData("tableBanding", "rowBanding"));
tablebean.setID((new StringBuilder()).append("CrossTable").append(oawebbean.getID()).toString());
oawebbean.setAttributeValue("CrossTableId", tablebean.getID());
DictionaryData adictionarydata[] = new DictionaryData[j + 1];
Object obj = null;
Object obj1 = null;
for(int k1 = 0; k1 <= j; k1++)
OAWebBean oawebbean1 = createColumn(k1);
if(k1 == k)
oawebbean1.setRendered(false);
tablebean.addIndexedChild(oawebbean1);
if(k1 == 0)
adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
continue;
try
String s1 = (String)oaviewobject.getRowAtRangeIndex(k1 - 1).getAttribute("TextFormat");
if("Y".equalsIgnoreCase(s1))
adictionarydata[k1] = new DictionaryData("columnDataFormat", "textFormat");
else
adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
catch(Exception exception1)
adictionarydata[k1] = new DictionaryData("columnDataFormat", "numberFormat");
tablebean.setColumnFormats(new ArrayDataSet(adictionarydata));
return tablebean;
private static OAWebBean createColumn(int i)
OAFlowLayoutBean oaflowlayoutbean = new OAFlowLayoutBean();
OAMessageTextInputBean oamessagetextinputbean = new OAMessageTextInputBean();
OAMessageStyledTextBean oamessagestyledtextbean = new OAMessageStyledTextBean();
OAMessageDateFieldBean oamessagedatefieldbean = new OAMessageDateFieldBean();
OASwitcherBean oaswitcherbean = new OASwitcherBean();
Hashtable hashtable = new Hashtable();
hashtable.put("CtPPRTrgCol", new DataBoundValue(new CrossTableColumnData(i, "Name")));
oaswitcherbean.setNamedChild("input", oamessagetextinputbean);
oaswitcherbean.setNamedChild("date", oamessagedatefieldbean);
oaswitcherbean.setChildNameBinding(new CrossTableColumnData(i, "Render"));
oaflowlayoutbean.addIndexedChild(oaswitcherbean);
oaflowlayoutbean.addIndexedChild(oamessagestyledtextbean);
oamessagetextinputbean.setNameBinding(new CrossTableColumnData(i, "Name"));
oamessagetextinputbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
oamessagetextinputbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
oamessagetextinputbean.setAttributeValue(COLUMNS_ATTR, "12");
oamessagetextinputbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagetextinputbean, null, "update", hashtable, null));
oamessagetextinputbean.setDataType("NUMBER");
oamessagetextinputbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
oamessagetextinputbean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, new DataBoundValue(new CrossTableColumnData(i, "SubmitValidator")));
oamessagedatefieldbean.setNameBinding(new CrossTableColumnData(i, "Name"));
oamessagedatefieldbean.setTextBinding(new CrossTableColumnData(i, "Text1"));
oamessagedatefieldbean.setValueBinding(new CrossTableColumnData(i, "Text1"));
oamessagedatefieldbean.setAttributeValue(DESCRIPTION, new DataBoundValue(new CrossTableColumnData(i, "Label")));
oamessagedatefieldbean.setAttributeValue(COLUMNS_ATTR, "12");
oamessagedatefieldbean.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR, OAWebBeanUtils.getFirePartialActionForSubmit(oamessagedatefieldbean, null, "update", hashtable, null));
oamessagedatefieldbean.setDataType("DATE");
oamessagedatefieldbean.setAttributeValue(READ_ONLY_ATTR, new DataBoundValue(new CrossTableColumnData(i, "ReadOnly")));
oamessagestyledtextbean.setTextBinding(new CrossTableColumnData(i, "Text2"));
return oaflowlayoutbean;
Pls let me know for any clarifications.
Thanks,
Srikanth -
How to run business services as dynamically generated Subject?
Hi experts,
I have configured a business service which puts a message on a JMS queue in a weblogic container other than ALSB's weblogic container.The queue is configured with a security policy [say a 'MessagePublisher' role], so that only users with role of 'MessagePublisher' can send message to that queue.
We have different partners SFTPing messages(xml/csv/excel format) to us, of which only few of them would have a role of 'Message Publisher'. I have configured a proxy to read these files from a directory, however sender of some of these messages may not have a role of 'Message Publisher'.
I am expecting the senders' credentials to be appended to the message by some process on SFTP server. How can I generate a 'Subject' within a proxy using these credentials and do a run as on the business service, so that only users with the role of 'MessagePublisher' succeed in sending message to the queue.
I probably can configure my business service to run as a user account who has the relevant role, but I do not want to hard code the UserAccount within business service and obtain a user account using sender's credentials.
Is ALSB not supposed to be used as suggested above?Would highly appreciate any thoughts on this..
Regards.The JMS business service can use only a static service account. I think this has an undesirable implication that the business service cannot be invoked as a dynamically generated subject.
Only way I know of to enforce role based access control in this scenario is to have an extra proxy service in front of JMS business service. Enforce access control over this extra proxy service.
To invoke this extra proxy service with credentials embedded embedded in the message, I think you need to look at "custom authentication" option under message level security. I am not sure how this would work. May be someone here can explain that. -
Many times dynamic generate UIElement at Runtime ???
Hello Everyone,
I wanna generate a UIElement (InputField) at runtime. When man click a button "Add InputField", then a UIElement (InputField) is dynamic generated. Man can generate many times UIElement"InputField" with this button.
I have tried the Webdynpro Tutorial 17. But not yet any idea.
Plx give me some suggestions and code.
Thanks in advance
best regards
Yaninghi
for this create 2 int variables <b>act</b> and a <b>counter</b>
//@@begin others
static int act,counter=0;
//@@end
<b>in Doinit set act to 0.</b>
public void wdDoInit()
//@@begin wdDoInit()
act=0;
//@@end
<b>create an action(onActionCreate_Element) and assign it to the button ui element</b>
public void onActionCreate_Element(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionCreate_Element(ServerEvent)
act = 1;
//@@end
<b>in wdDoModifyView</b>
public static void wdDoModifyView(IPrivateDynamicView wdThis, IPrivateDynamicView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
//@@begin wdDoModifyView
if( act== 1)
IWDTransparentContainer con= (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDInputField input = (IWDInputField)view.createElement(IWDInputField.class,"input1"+counter);
IWDAttributeInfo test = wdContext.getNodeInfo().addAttribute("name"+counter,"ddic:com.sap.dictionary.string");
input.bindValue(test);
input.setVisible(WDVisibility.VISIBLE);
counter++;
con.addChild(input);
act = 0;
//@@end -
How to put links (name anchors) in a dynamic generated page
I have a page (results.asp) that gets dynamically generated
from a db using a DW and MySQL app. The page (a table) looks
sometihng like this:
Year Card #
1951 01
1951 02
1951 03
1952 01
1952 02
1953 01
1953 02
1953 03
and so on
I've made the "Year" column a text link and added a Pop-Up
Menu behavior so that users could select a year and jump directly
to a specific section of the page (table). However, I'm not sure
how to put a <a href> name anchor in for each of the years.
For instance calling :
<a name="1951">1951</a>
from a declaration of:
<a href="#1951">Go to year 1951</a>
I would want to call each year (1951, 1952...1973) using name
anchors. But again, I'm not sure how to put all the named anchors
in a document that gets dynamically generated. It is a a table that
gets its data generated via a Repeated Region. Hope this question
makes sense. Any suggestions/comments appreciated. Thanks.If you year card allways follows that format then you could
use the
following code on the page.
Outside of the repeat region have this statement
<%
Dim TestYear, CurrentYear, ThisYearCard
TestYear = "0000"
%>
Then in the repeat region where you want the anchor to appear
use this code
<%
ThisYearCard = recordset.fields.item("YearCard").value
CurrentYear = Left(ThisYearCard, 4)
If TestYear <> CurrentYear then
response.write("A name='") & CurrentYear & "'>"
TestYear = CurrentYear
End if
%>
Where you want the Year card to appear you would then use
<%=ThisYearCard%>
rather than the recordset element.
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"obcbeatle" <[email protected]> wrote in
message
news:e67pg5$rp0$[email protected]..
>I have a page (results.asp) that gets dynamically
generated from a db using
>a
> DW and MySQL app. The page (a table) looks sometihng
like this:
>
> Year Card #
> 1951 01
> 1951 02
> 1951 03
> 1952 01
> 1952 02
> 1953 01
> 1953 02
> 1953 03
> and so on
>
> I've made the "Year" column a text link and added a
Pop-Up Menu behavior
> so
> that users could select a year and jump directly to a
specific section of
> the
> page (table). However, I'm not sure how to put a <a
href> name anchor in
> for
> each of the years. For instance calling :
>
> <a name="1951">1951</a>
>
> from a declaration of:
>
> <a href="#1951">Go to year 1951</a>
>
> I would want to call each year (1951, 1952...1973) using
name anchors.
> But
> again, I'm not sure how to put all the named anchors in
a document that
> gets
> dynamically generated. It is a a table that gets its
data generated via a
> Repeated Region. Hope this question makes sense. Any
> suggestions/comments
> appreciated. Thanks.
> -
Issue with emailing dynamically generated PDF (InteractiveForm UI element)
Hi Experts ,
I have a requirement according to which i need to generate PDF dynamically using webdynpro java and email the dynamically generated PDF.
I am facing issue while emailing the dynamically genarated pdf.
It gives me an exception :
nested exception is: javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.IOException: no data
This is because its unable to get the binary data (byte array) of the dynamically generated PDF which is required to send mail.
Could some one suggest me how to fetch the binary data of the dynamically generated PDF.
For dynamic PDF generation i am using dynamic generation of UI element InteractiveForm UI Element
In case of static PDF (i.e. the PDF genarated by inserting the InteractiveFrom Ui element on the view using the insert child option) we do set the pdf source property of Interactive Form UI element to a context variable attribute of type binary but my problem is ,how to set the PDF source of a dynamically generated Interactive form UI element to a context variable attribute of type binary ..
Any help would be highly appreciated.
Regards ,
NavyaHi Frank ,
the code to generate PDF dynamically is written in the WdDoModifyView section of the view as the PDF need to be generated dynamically., i.e. by adding InteractiveForm UI elements at runtime.
I tried the code suggested by you but i gave mean exception.
errorjava.io.FileNotFoundException:
(The system cannot find the path specified)
Kindly let me know where i am going wrong .
Below is the code that i had written in a separate method m_mail().
This would take as input the name of the dynamically generated data node and is called from the wdDoModifyView section of the view
public void m_mail( java.lang.String p_dynamicnodeName )
ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
// This would need to have the Templatefile in the Mimes-Directory of the Webdynpro-Component
String templateUrl = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "AdobeView1_InteractiveForm.xdp");
InputStream templateSourceInputStream = new FileInputStream(templateUrl);
IOUtil.write(templateSourceInputStream, templateSourceOutputStream);
IWDPDFDocumentCreationContext pdfContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
pdfContext.setData(WDInteractiveFormHelper.getContextDataAsStream(wdContext
.nodeCtx_vn_dynmcnd()
.getChildNode(p_dynamicnodeName, IWDNode.NO_SELECTION)));
pdfContext.setTemplate(templateSourceOutputStream);
pdfContext.setInteractive(false);
IWDPDFDocument pdf = pdfContext.execute();
if (pdf != null) {
pdfArray = pdf.getPDF();
Kindly let me know where am i going wrong.
Regards ,
Navya -
Anyone know how to fix the error below.
Trying to use the option to generate a chart from the pivot table controls.
Error Generating Chart
Assertion failure: nRequestedLayer < m_vLayerPositions.size() at line 979 of ./project/webcharts/chartdatatable.cpp
Error Details
Error Codes: OQ78YWIWRestart OC4J and check.
It worked with me. I am using OBIEE 10.3
manohar rana -
Error Generating Chart on Windows XP professional
Good day all,
I do not understand why I can not create charts, I can view the data in tables and perform other operations but I cal not view charts using the available data.
Any time i try it, the error comes up
Error Generating Chart
An error occurred during execution of "connect". No connection could be made because the target machine actively refused it.
Error Details
Error Codes: ETI2U8FA
can anyone help out.The java host service was not started.
-
Error Generating Chart on Solaris
We're running OBIEE 10.1.3.2.1 on Solaris 10 and receive the following error when creating charts:
Error Generating Chart
An error occurred during execution of "send". Broken pipe [Socket:16]
Error Details
Error Codes: ETI2U8FA During install we used JDK1.5.0_07, I've now installed JDK1.6.0_01 and changed the instanceconfig.xml file so it points to the new JDK1.6.0_01 environment. After restarting the presentation service (run-saw.sh), the error still exists.
Does anyone know what might be the issue? Do I've to change the JDK-version also on other locations?
MichaelSolved by changing the common.sh in the <OracleBI>/setup directory, this file holds the JAVA_HOME-path. After editing restart the run-sa.sh and run-saw.sh.
Michael -
How can we create dynamic pie chart in jsp
hi im a new jsp programmer and i just want to know how can i create dynamic pie chart in jsp
http://sourceforge.net/projects/jfreechart
- Saish -
Cannot generate chart in PDF using BI Publisher
I have a java program to generate chart in PDF using BI publisher. In some platforms the chart cannot be generated. Get the following exception.
[061812_075947838][][ERROR] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.apps.xdo.template.rtf.img.RTFChartUtil.invokeMethod(Unknown Source)
at oracle.apps.xdo.template.rtf.img.RTFChartUtil.generateChartAsBase64(Unknown Source)
at oracle.apps.xdo.template.rtf.XSLTFunctions.chart_svg(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.xdo.parser.v2.XSLExtFunctions.callStaticMethod(XSLExtFunctions.java:111)
at oracle.xdo.parser.v2.XPathExtFunction.evaluateMethod(XPathExtFunction.java:307)
at oracle.xdo.parser.v2.XPathExtFunction.evaluate(XPathExtFunction.java:226)
at oracle.xdo.parser.v2.XSLValueOf.processAction(XSLValueOf.java:101)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:512)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
at com.edocs.common.reporting.batch.BatchEventHandler.generatePDFFile(BatchEventHandler.java:327)
at com.edocs.common.reporting.batch.BatchEventHandler.processBatchRequest(BatchEventHandler.java:252)
at com.edocs.common.reporting.batch.BatchEventHandler.service(BatchEventHandler.java:136)
at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.executeInternal(BatchReportProcessorTask.java:126)
at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask.doProcessTask(BatchReportProcessorTask.java:46)
at com.edocs.pwc.tasks.CommonTask.processTask(CommonTask.java:166)
at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl.processTask(Unknown Source)
at com.edocs.common.reporting.tasks.batchprocessor.BatchReportProcessorTask_9qwgr6_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.NoSuchMethodError: oracle.dss.util.CustomStyle.<init>(Ljava/io/InputStream;)V
at oracle.dss.graph.CommonGraph.setStyleStream(CommonGraph.java:10774)
at oracle.dss.graph.CommonGraph.setStylePath(CommonGraph.java:10743)
at oracle.dss.graph.CommonGraph.setStylePathXML(CommonGraph.java:12138)
at oracle.dss.graph.CommonGraph.setXML(CommonGraph.java:13348)
at oracle.dss.graph.CommonGraph._setXML(CommonGraph.java:15821)
at oracle.dss.graph.CommonGraph.setXML(CommonGraph.java:14751)
at oracle.dss.graph.Graph.setXML(Graph.java:5243)
... 60 more
In office word bi publisher plugin, load the xml, the chart can be generated.
The above exception only occurs in some linux and solaris platforms, but never occurs in windows.
The following plateform throws exception.
Oracle Linux Server release 5.6 + java version "1.6.0_25"
The following plateform doesn't throw exception.
Enterprise Linux Enterprise Linux Server release 5.4 (Carthage) + java version "1.6.0_05"
The strange thing is in those platforms which can throw exception, if the code is not running in EJB, the chart still can be generated.
In other words, if the normal web or standalone app invokes that program; the chart can be generated.
The java code is as below.
public static void generate(String inputXML, String pdfTempPath, String outputPDF) {
Reader reader = null;
try {
File xmlFile = new File(inputXML);
reader = new BufferedReader(new InputStreamReader(new FileInputStream(xmlFile), "UTF-8"));
ByteArrayOutputStream tmpXSL = new ByteArrayOutputStream();
RTFProcessor rtfProcessor = new RTFProcessor(pdfTempPath);
rtfProcessor.setOutput(tmpXSL);
rtfProcessor.process();
ByteArrayInputStream in = new ByteArrayInputStream(tmpXSL.toByteArray());
FOProcessor processor = new FOProcessor();
processor.setData(reader);
processor.setTemplate(in);
processor.setOutput(outputPDF);
processor.setOutputFormat(FOProcessor.FORMAT_PDF);
processor.generate();
catch(Exception e) {
e.printStackTrace();
finally {
try {
if(reader!=null) {
reader.close();
} catch (Exception e) {
Can anyone explain why this exception is thrown?
Thanks a lot.Hello Tux Dueñas,
I think you need to have ACL's setup in Oracle 11g in order to be able to connect to the BI Publisher server. Check the following link on how to setup ACL's in 11g...
http://download.oracle.com/docs/cd/B28359_01/server.111/b28300/afterup.htm#BABFCBJI
Thanks,
Machaan
Edited by: Machaan on Jan 25, 2011 11:49 AM
Maybe you are looking for
-
Migrating Workflow Customizations from 11i to R12
Hi: I have customizations to the PO Account Generator workflow that need to migrate from 11i to R12. I've attempted to drag 'n drop and copy/paste between workflow processes, but have been unsuccessful. Does anyone know of a way to migrate changes in
-
XSLT for payload with namespaces
Hello Experts, attn:Stefan. I am using a XSLT to parse the input xml payload and retrieve the Value of a particular field which will be used for receiver determination. The XSL code used by me is : <?xml version="1.0" encoding="UTF-8"?> <xsl:s
-
Hi Im having trouble with my Xperia Z3 compact when i go to attach a video to a text message to send i get an error saying the files to big too attach, thats even a 3 or 4 second video i get that error, i have the lasted software installed , i
-
Captivate 6 editing - on timeline, audio is out of sync after pausing
I am trying to create a software demo for my company. I am using the HD video and then have imported audio recordings over the video. The big work portion of this project is adding call-out smart shapes on the video during certain portions to highlig
-
Adobe Printer before would open...
the file in Acrobat after it printed, showing the document. Now it prints, but Acrobat does not open, even though the preferences say it should. Using Acrobat Pro Extended 9.4.4 and Firefox 4. Any suggestions?