XSLT Problem in Sum value
Hello,
How can I get the sum() of the XML in some two fields?
<orders>
<order>
<item>Book</item>
<qty>10</qty>
<price>12.5</price>
</order>
<order>
<item>CD</item>
<qty>3</qty>
<price>6.99</price>
</order>
</orders>
How can I get the subtotal ????
-- subtotal = sum(qty*price)
Eric
here what you're looking for!
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="total" />
<xsl:template match="orders">
<html>
<Head>
<title>main file</title>
</Head>
<body>
<xsl:apply-templates select="order"/>
totale:<xsl:value-of select="round(sum(child::*/child::qty)*sum(child::*/child::price))"/>
</body>
</html>
</xsl:template>
<xsl:template match="order">
<xsl:variable name="quantite" select="./qty"/>
<xsl:variable name="price" select="./price"/>
subtotal<xsl:value-of select="position()"/>=<xsl:value-of select="$quantite*$price"/>
</xsl:template>
</xsl:stylesheet>
Similar Messages
-
XSLT : Problem using xsl:value-of disable-output-escaping="yes"
Hello,
I have some problem using "disable-output-escaping" attribute of xsl:value-of() function.
I have a table SONGS with two columns XML and XSL filled with :
<song>
<title>Isn't she lovely?</title>
</song>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="UTF-8"></xsl:output>
<xsl:template match="//song">
<out>
<xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
</out>
</xsl:template>
</xsl:stylesheet>The query to transform XML with XSL :
SELECT XMLTRANSFORM (xml, xsl) FROM songs;I get this XML :
<out>Isn't she lovely?</out>but I want that (without the '&' special character) :
<out>Isn't she lovely?</out>How can I procees to succeed ?
Thanks,
DominiqueWhat DB version?
The following SQL
select xmltransform(XMLTYPE('<song>
<title>Isn''t she lovely?</title>
</song>'), XMLTYPE('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="UTF-8"></xsl:output>
<xsl:template match="//song">
<out>
<xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
</out>
</xsl:template>
</xsl:stylesheet>'))
from dual;produces this on 11.1.0.6
<?xml version="1.0" encoding="UTF-8"?>
<out>Isn't she lovely?</out>and this on 10.2.0.4
<out>Isn't she lovely?</out>I found a couple of previous discussions regarding this at
{thread:id=679397}
{thread:id=879301}
The last discussion provides a workaround if you need it. -
Error in printing sum value of DME file in Automatic Payment Run
Hi All,
We are in the process of upgrading from R/3-4.0B to ECC6.0.
In Automatic Payment run in transaction F110, when the spool is generated, the sum values is displaying in correctly. It is displaying and printing as actual value/100 for example if total of all the line items is 1000000, the sum value displaying as 10000 and in words also prints as ten thousands.
Kindly let us know how to fix the issue, if any one has come across with similar issue.
Thanx & Regards
AshokHi VVR,
I got the following errors:
Err Message text
003 Item is blocked for payemnt
007 Error in creating the payment doc, read job log.....
But if we have a look at the job log it is showing for all the 50,000 items... how to find where the problem is???
thanks. -
Sum values in last row for date format "hh24:mi"
Hi,
I have a big problem creating a sum row with date data.
I created a sql view where the result looks like that:
SELECT category_name,
user_name,
b_mmyyyy,
b_1, ..., b_31
FROM view_category_user_booking
category_name, user_name, b_1, ..., b_31
category1, user1, 122008, 01:00, ..., 03:30
category2, user1, 122008, 02:00, ..., 01:00
category3, user1, 122008, 00:00, ..., 00:15My goal is to integrate a sum row at the end for the columns b_1 ... b_31
category_name, user_name, b_1, ..., b_31
category1, user1, 122008, 01:00, ..., 03:30
category2, user1, 122008, 02:00, ..., 01:00
category3, user1, 122008, 00:00, ..., 00:15
Sum, user1, 122008, 03:00, ..., 04:45I tried it like that:
select decode(grouping(category_name),1,'Summe',category_name),
sum(to_number(replace(b_1,':',','))) as b_1,
sum(to_number(replace(b_31,':',','))) as b_31
from category_user_booking
where user_name = 'user1'
and b_mmyyyy = '122008'
group by rollup(category_name)But the result isn't really successful
category_name, b_1, b_31
category1, 1, 3,3
category2, 2, 1
category3, 0, 0,15
Sum, 3, 4,45Is there somebody with an idea?
Thanks ahead,
TobiasHi Avinash,
the problem is not the grouping it is the date format.
Instead of a value like 5,4 > I want 05:40 or 1,75 > I want 02:15 in the sum value.
In my table all time values are saved in the format hh24:mi.
I don't know how to get that via a sql statement.
Output I want:
category_name, user_name, b_1, ..., b_31
category1, user1, 122008, 01:00, ..., 03:30
category2, user1, 122008, 02:00, ..., 01:00
category3, user1, 122008, 00:00, ..., 00:15
Sum, user1, 122008, 03:00, ..., 04:45Regards,
Tobias -
How to sum value from a day to next day
First, I provided the CREATE and INSERT sql statements for testing:
CREATE TABLE TBL_CALC
"YEAR" VARCHAR2(4),
"MONTH" VARCHAR2(2),
"DAY" VARCHAR2(2),
"HOUR" VARCHAR2(2),
"VALUE" VARCHAR2(20)
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','20','32')
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','21','33');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','22','53');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','1','23','28');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','0','37');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','1','35');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','2','39');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','3','57');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','13','42');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','2','14','12');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','21','32');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','22','52');
insert into tbl_calc (year,month,day,hour,value) values ('2000','1','31','23','29');
insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','0','27');
insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','1','45');
insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','2','69');
insert into tbl_calc (year,month,day,hour,value) values ('2000','2','1','3','68');I have this sql to get the period of time of a day:
select year,month,day,hr,val,
sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by year,month,day) as new_value
from(
select year,month,day,to_number(hour) hr,to_number(value) val from tbl_calc
order by year,month,day,hrHere's the output:
YEAR MONTH DAY HR VAL NEW_VALUE
2000 1 1 20 32 146
2000 1 1 21 33 146
2000 1 1 22 53 146
2000 1 1 23 28 146
2000 1 2 0 37 168
2000 1 2 1 35 168
2000 1 2 2 39 168
2000 1 2 3 57 168
2000 1 2 13 42 168
2000 1 2 14 12 168
2000 1 31 21 32 113
2000 1 31 22 52 113
2000 1 31 23 29 113
2000 2 1 0 27 209
2000 2 1 1 45 209
2000 2 1 2 69 209
2000 2 1 3 68 209
17 rows selected The above sql get the sum of time period which in 20-23 and 0-3 in every day.
The values are recorded by each hour. (sometimes there are missed hours)
My problem is how to get the sum of time period over each day?
For example, I need to get the sum of value of a day night time from 20-23 and the next day morning 0-3, to become a sum value in this period.
Let say, the sum from 1st Jan night time to 2nd Jan morning should be combined into 1 value (146+168)=314.
In addition, there is a tricky point is that from every month last day (31th Jan night time to 1st Feb morning time) are also need to be combined into 1 value.
And it appears the new problem is that how about if the last day is in a non-regular day (not 30,31,28,29), just say maybe March consist only 15 period records only and the last day is 19th March.
The expected output:
YEAR MONTH DAY HR VAL NEW_VALUE
2000 1 1 20 32 314
2000 1 1 21 33 314
2000 1 1 22 53 314
2000 1 1 23 28 314
2000 1 2 0 37 314
2000 1 2 1 35 314
2000 1 2 2 39 314
2000 1 2 3 57 314
2000 1 2 13 42 314
2000 1 2 14 12 314
2000 1 31 21 32 322
2000 1 31 22 52 322
2000 1 31 23 29 322
2000 2 1 0 27 322
2000 2 1 1 45 322
2000 2 1 2 69 322
2000 2 1 3 68 322
17 rows selected I think its quite complicated case, please ask me for more if you need to clarify for something.
Thanks so much!! :)
Edited by: 920575 on 2012/7/31 上午 1:09Are you looking for something like this (partially tested)...
SQL> ed
Wrote file afiedt.buf
1 select year
2 ,month
3 ,day
4 ,hr
5 ,val
6 ,sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by year,month,day) as new_value
7 ,sum(case when hr between 20 and 23 or hr between 0 and 3 then val else 0 end) over (partition by trunc(dt-(4/24),'DD')) as day_value
8 from(
9 select year,month,day,to_number(hour) hr,to_number(value) val
10 ,to_date(year||lpad(month,2,'0')||lpad(day,2,'0')||lpad(hour,2,'0')||'0000','YYYYMMDDHH24MISS') as dt
11 from tbl_calc
12 )
13* order by year,month,day,hr
SQL> /
YEAR MO DA HR VAL NEW_VALUE DAY_VALUE
2000 1 1 20 32 146 314
2000 1 1 21 33 146 314
2000 1 1 22 53 146 314
2000 1 1 23 28 146 314
2000 1 2 0 37 168 314
2000 1 2 1 35 168 314
2000 1 2 2 39 168 314
2000 1 2 3 57 168 314
2000 1 2 13 42 168 0
2000 1 2 14 12 168 0
2000 1 31 21 32 113 322
2000 1 31 22 52 113 322
2000 1 31 23 29 113 322
2000 2 1 0 27 209 322
2000 2 1 1 45 209 322
2000 2 1 2 69 209 322
2000 2 1 3 68 209 322
17 rows selected.This turns the values into a proper DATE datatype and then offsets that back by 4 hours to bring the 0-3 hours into the previous day, and then partitions the sum based on that day. -
Facing Problem with passing Values from One report to another
Hi,
I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
Please, let me know whats going wrong.
Thanks for the help.sorry for the late updation.
My First Report, Summary level is a Pivot Table.
I tried the same report with Table option, the value is passing correctly.
Is there a way to get rid of this situation using Pivot table.
Thanks for your help.
below is the original request.
Hi,
I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
Please, let me know whats going wrong.
Thanks for the help. -
i am facing problem while reading values from properties file ...i am getting null pointer exception earlier i was using jdeveloper10g now i am using 11g
hi TimoHahn,
i am getting following exception in JDeveloper(11g release 2) Studio Edition Version 11.1.2.4.0 but it works perfectly fine in JDeveloper 10.1.2.1.0
Root cause of ServletException.
java.lang.NullPointerException
at java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:136)
at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at org.rbi.cefa.master.actionclass.UserAction.execute(UserAction.java:163)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) -
Problem getting parameter values at the service end point
I am having problem getting parameter values at the service end point. I created service end point and this method is having 35 parameters and then i created test client file using Sun One Studio 5. but when i run this test client and make a call to service it sends wrong value to first three parameters to the service end point. I tried all the way round but it gave me same sort of problem. I change the order of parameters change the names of parameters but it didn�t work. And then i started chopping of parameter from the left side. And my problem is solved when my parameter list reached to 12 from 35. So is it a bug or some problem with my configuration or some thing else.
I am using sun one studio 5 with sun one app 7. My service end point does very simple thing. It only takes out put of the parameter to the server log file. And my wsdl file seems all right. There is no conflict with the count and data type of the parameter information it contains.
� Service End Point Definition (in EJB)
public java.lang.String setNewAddress(java.lang.String propertyName, java.lang.String status, java.lang.String PMSCode, java.lang.String streetNumPrefix, int streetStartNum, java.lang.String streetStartNumSuffix, int streetEndNum, java.lang.String streetEndNumSuffix, java.lang.String streetName, java.lang.String streetType, java.lang.String streetSuffix, java.lang.String localityPrefix,java.lang.String localityName, java.lang.String postcode, java.lang.String stateCode, java.lang.String countryCode, java.lang.String description, java.lang.String coordinateAccuracy, int longitude, int latitude, java.lang.String planNumber, java.lang.String lotPrefix, int lotNumber, int siteID, java.lang.String countryName, java.lang.String parishName, java.lang.String section, int portionNum, int crownAllotNum, int titleVol, java.lang.String folio, java.lang.String esa, int aliasID, int aliasTagID,String ID) {
System.out.println(propertyName);
System.out.println(PMSCode);
System.out.println(streetNumPrefix);
........ taking printout of all the paramters
� This is my WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="NMService" targetNamespace="urn:NMService/wsdl" xmlns:tns="urn:NMService/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types/>
<message name="NMServiceServantInterface_setNewAddress">
<part name="String_1" type="xsd:string"/>
<part name="String_2" type="xsd:string"/>
<part name="String_3" type="xsd:string"/>
<part name="String_4" type="xsd:string"/>
<part name="int_5" type="xsd:int"/>
<part name="String_6" type="xsd:string"/>
<part name="int_7" type="xsd:int"/>
<part name="String_8" type="xsd:string"/>
<part name="String_9" type="xsd:string"/>
<part name="String_10" type="xsd:string"/>
<part name="String_11" type="xsd:string"/>
<part name="String_12" type="xsd:string"/>
<part name="String_13" type="xsd:string"/>
<part name="String_14" type="xsd:string"/>
<part name="String_15" type="xsd:string"/>
<part name="String_16" type="xsd:string"/>
<part name="String_17" type="xsd:string"/>
<part name="String_18" type="xsd:string"/>
<part name="int_19" type="xsd:int"/>
<part name="int_20" type="xsd:int"/>
<part name="String_21" type="xsd:string"/>
<part name="String_22" type="xsd:string"/>
<part name="int_23" type="xsd:int"/>
<part name="int_24" type="xsd:int"/>
<part name="String_25" type="xsd:string"/>
<part name="String_26" type="xsd:string"/>
<part name="String_27" type="xsd:string"/>
<part name="int_28" type="xsd:int"/>
<part name="int_29" type="xsd:int"/>
<part name="int_30" type="xsd:int"/>
<part name="String_31" type="xsd:string"/>
<part name="String_32" type="xsd:string"/>
<part name="int_33" type="xsd:int"/>
<part name="int_34" type="xsd:int"/>
<part name="String_35" type="xsd:string"/></message>
<message name="NMServiceServantInterface_setNewAddressResponse">
<part name="result" type="xsd:string"/></message>
<portType name="NMServiceServantInterface">
<operation name="setNewAddress" parameterOrder="String_1 String_2 String_3 String_4 int_5 String_6 int_7 String_8 String_9 String_10 String_11 String_12 String_13 String_14 String_15 String_16 String_17 String_18 int_19 int_20 String_21 String_22 int_23 int_24 String_25 String_26 String_27 int_28 int_29 int_30 String_31 String_32 int_33 int_34 String_35">
<input message="tns:NMServiceServantInterface_setNewAddress"/>
<output message="tns:NMServiceServantInterface_setNewAddressResponse"/></operation></portType>
<binding name="NMServiceServantInterfaceBinding" type="tns:NMServiceServantInterface">
<operation name="setNewAddress">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:NMService/wsdl"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/></binding>
<service name="NMService">
<port name="NMServiceServantInterfacePort" binding="tns:NMServiceServantInterfaceBinding">
<soap:address location="http://localhost:80/NMService/NMService"/></port></service></definitions>
� I followed steps given this example. http://developers.sun.com/prodtech/javatools/jsstandard/reference/docs/s1s5/stockapp.html.
If some one know what is wrong. Is it me or some thing wrong with the method I followed. But I am sure that I followed exactly the same method as it given in examples. So if some one can guide me
ThanksI just found that there is a bug with Sun One Studio 5. It creates faulty JSP file to test the client for the web services. With above problem I tested my web services using different developing environment such as Jdeveloper 10g. I created client stub using wsdl file generated by sun one studio. And made call to my web service and all the parameter reached perfectly at service end point. And then I used stub class created by sun one studio for the client and made the same call. And it also went well. So the problem is with the test application (JSP File) sun one creates for my web service.
This is the majore problem i faced during the development. But still there is many problem along with this which is not seriouse enough but requires attension. I would like sun developers to make sun one studio IDE simpler and handy . -
Getting Problem in retrieving values from JTable
Hi Guys,
Suppose i clicked in cell in a table to edit it and done some entry in it and without leaving that cell ( means focus is on that cell only) i clicked one button.
button prints table data on console.
now problem is the value in focused cell is coming as null or wht i previously return.
that means unless i m not leaving a cell the Jtable is not taking that value.
how could i overcome this problem
thanks in advanceUse this:table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);The editor will be closed as soon as the table loses focus.
-
Hi Experts,
I have a problem with offset values. I have create a variable on OFISCPER, it's characteristic value, indivdual value, mandatory and ready for the input. I need to show the varibel period and the l previous period and so on till 12 periods. I used the offset values (-1, -2, etc.) but when I execute the query I can show just the variable period and the period previous I don`t see. The query is based on multiprovider and don´t has filters. Can anyone help me?Leonel,
You may nt need to have 12 columns in the query designer.
You could include the keyfigure and restrict it to the variable and create the offset for the 12 periods
Check this http://help.sap.com/saphelp_nw04/helpdata/en/00/e8d13f7fb44c21e10000000a1550b0/frameset.htm
-Doodle -
Facing problem of Assigned Value in CJ33
Hi All,
I am facinfg a problem with Assigned value shown in CJ33 T code. My Sceneraio is like this.....
1. I have activated availiblity controll on Released Budget.
2. I have maintained tolerence limit only for PR and PO.
Now My problem is that I budgeted one of my WBS as INR2000, Same amount is released also. I created a PR for INR500. The same PR is converted to a Purchase order of INR500.
Now in CJ33 T code my assigned value is comming as INR1000. Which is not correct for me because i have only used INR500 for my INR2000 budget and i want to use my Remaining INR1500 budget for another PR, But system is giving me Budget excedded error.
Please advise. It would be a great help of all of you.
Regards
RahulHi Rahul,
Refer this thread,
Assigned Values For Project
I had a strong feelilng that you were using ECC 5.0. I had come across the same issue. Just refer the note and try to apply the notes mentioned there. I am not sure which one i had applied but you can try out with the note number that Muraleedharan has mentiond in the thread. It should work.
Kindly revert.
Best Regards,
Gokul -
Probleme changing the value of a variable in movieclip from my scene
Hello,
i have a probleme changing the value of a variable in movieclip from my scene. i explain: I have combobox on my scene containing categories, and in the scene i load an xml file containing links to php files that work with the combobox.
Also on the scene i have a movieclip "filmstrip", inside this movieclip on the first frame i have a script loading the php file selected in the scene . i use a load() function with a variable "theUrl" inside like this : T.load(theUrl);.
In my scene i want to change the value of "theUrl" inside the movieClip filmstrip. I tried filmstrip.theUrl = url; But it doesnt work
the xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
<area title1="10 Last updated" link1="link1.php"/>
<area title1="special" link1="link2.php"/>
</slideshow>
here is the code on my scene:
var link1:Array = new Array();
var LINK:String;
var url:String;
var whoOn:Number;
whoOn=0;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
_root.link1.push(photos[i].attributes.link1);
url=link1[whoOn];
filmstrip.theUrl=url;//<<--HERE
x.load("category.xml");
var cbListener:Object = new Object();
cbListener.change = function(event_obj:Object) {
trace(select.selectedItem.label);
if (select.selectedItem.label == "Last updated") {
whoOn=0;
} else if (select.selectedItem.label == "Special") {
whoOn=1;
url=link1[whoOn];
filmstrip.theUrl=url; //<<-----HERE
select.addEventListener("change",cbListener);
here is the code inside the movie clip "filmstrip"
var T:XML = new XML();
T.ignoreWhite = true;
T.onLoad = function(xml) {
etc etc etc }
T.load(theUrl); //<<---HERE it still undefinedYESSSS . Thanks you very much Kglad it wotk i put all in a function inside the filmstrip function Tload(theUrl){etc ect}and in the root i call it like this filmstrip.Tload(theUrl); and it works
code in the root var link1:Array = new Array();
var LINK:String;
var url:String;
var whoOn:Number;
whoOn=0;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
_root.link1.push(photos[i].attributes.link1);
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<--HERE
x.load("category.xml");
var cbListener:Object = new Object();
cbListener.change = function(event_obj:Object) {
trace(select.selectedItem.label);
if (select.selectedItem.label == "Last updated") {
whoOn=0;
} else if (select.selectedItem.label == "Special") {
whoOn=1;
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<-----HERE
select.addEventListener("change",cbListener); -
Problem in the values in invoice
HI All,
i have a problem in invoice printing, If i create a new billing document and generate the output via VF02, the line item values and tax values in the amount column not getting printed properly. if i take the printout for the same document again everything is comng perfectly. I have debugged the subroutine program which i created is working fine in the debug mode. when i generate any invoice for the first time, i have a problem in the values.
Please help me to find this..
Thanks and Regards,
Ahamed Anish S.this was solved by myself..
-
Real simple xslt problem/question
Hi, i have a real simple xslt problem but i just cant figure out how to do it by looking at various examples on the net. i have a xml document and in it are some elements with a "result" tag name. i want to use xslt to reproduce exactly the same xml document except with an attribute called "id" added to those elements with a "result" tag name. i'm sure that theres a simple solution to it but i just cant figure it out. any helps greatly appreciated, thanks
Start with the XSLT identity transform (I don't have it handy and it's fairly long, but you should be able to google it up). Add this:<xsl:template match="result">
<result id="">
<xsl:apply-templates>
</result>
</xsl:template> -
Hi
I need to sum values for different CD_INDICATOR, same CD_CUSTOMER , same NM_CYCLE , same CD_STRUT, same PROFILE
CD_STRUT NUMBER(6)
NM_CYCLE NUMBER(6)
CD_CUSTOMER NUMBER(10)
CD_PROFILE NUMBER(2)
CD_INDICATOR NUMBER(6)
VL_INDICATOR NUMBER(15,2)
LAST_DATE DATE
SELECT CD_STRUT , NM_CYCLE ,
CD_CUSTOMER , CD_PROFILE , CD_INDICATOR ,
VL_INDICADOR VL_INDICATOR , DT_ULTIMA_ATUALIZACAO LAST_DATE
FROM MYTABLE PPC
WHERE PPC.CD_TYPE_STRUCT = 5 ---IS CONSTANT = 5
AND PPC.CD_STRUT = 4
AND PPC.NM_CYCLE = 200810
AND PPC.CD_CUSTOMER = 574970
AND PPC.CD_PROFILE = 1
AND PPC.CD_INDICATOR IN (4,2); CD_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR LAST_DATE
4 200810 574970 1 2 14.00 6/30/2008 8
4 200810 574970 1 4 1.00 6/30/2008 8 I must to sum VL_INDICATOR , with rule
When CD_INDICATOR = 4 AND VL_INDICATOR =1.00 I must return sum
of VL_INDICATOR 2 ( In case above =14) with 1, but if when
CD_INDICATOR = 4 AND VL_INDICATOR != 1 I must return only value of of VL_INDICATOR 2 ( In case above = 14)
I must return new CD_INDICATOR (5) as with below
CD_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR LAST_DATE
4 200810 574970 1 5 15.00 6/30/2008 8 if the values of CD_INDICATOR (2,4)
CD_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR LAST_DATE
4 200810 574970 1 2 12.00 6/30/2008 8
4 200810 574970 1 4 4.00 6/30/2008 8RETURN ME
CD_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR LAST_DATE
4 200810 574970 1 5 12.00 6/30/2008 8Hi
I must to sum values OF CD_INDICATOR 309 and 4 ,
When value of CD_INDICATOR 4 is equal 1 (One) then I sum 1 else I sum zero
But if record of CD_INDICATOR 4 not exists I must to sum 0
In example below the sum equal 10 because value of CD_INDICATOR 4 is equal 2
CD_STRUT CD_TYPE_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR
2 5 200810 3320080 1 309 10.00
2 5 200810 3320080 1 4 2.00 In example below the sum equal 15
CD_STRUT CD_TYPE_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR
2 5 200810 3320080 1 309 14.00
2 5 200810 3320080 1 4 1.00 In example below the sum is 10, because no exist cd_indicator 4
CD_STRUT CD_TYPE_STRUT NM_CYCLE CD_CUSTOMER CD_PROFILE CD_INDICATOR VL_INDICATOR
2 5 200810 3320080 1 309 10.00
SELECT c.CD_STRUT,
cCD_TYPE_STRUT,
cNM_CYCLE ,
cCD_CUSTOMER,
cCD_PROFILE ,
C.CD_INDICATOR,
c.VL_INDICATOR
from T_CUSOTMER a
INNER JOIN MYTABLE c ON ( a.cd_type_strut = c.cd_type_strut
AND a.cd_estru = c.cd_estrut
AND a.CUSTOMER = c.cd_CUSOTMER
AND c.nm_cyicle = 200810
AND c.cd_profile = 1
AND c.cd_indicator = 309
and c.cd_customer = 3320080)I Want to a OUTER LEFT JOIN with MYTABLE for to get CD_INDICATOR =4 , but I did know how can I do it
Message was edited by:
muttleychess
Maybe you are looking for
-
Pring VALUE field as blank, if it's worth is 0.00
Hello, I have value field (DATA: V_Net_Value TYPE KONV-NETWR) in my ALV grid display report. When i dont have any value, am getting 0.00 as output in my ALV report, but, user would like to see it as blank/nothing. Because of some reasons, i can not u
-
Error while testing proxy client for FinancialUtilService
Hi While testing my proxy client from jdev, I am receiving the below error. Attaching the code from my HTTPPortClient.Java file for your reference. Did anything wrong while invoking uploadFileToUCM service? Can you please suggest ? C:\Oracle\Middlewa
-
Every time since I upgraded both my iPhone 4S and my iPod touch when I go to connect to my wi if home network. I am asked to input the network passcode. This never happened before I upgraded. ( this is a known network). Cn anyone help?
-
OIM 11G, DSML integration failing with null pointer exception
Hi, we are facing the similar probelm while sending a request from TIBCO BW to OIM 11G (Which is weblogic) The below request from TIBCO is not working and thowing a NULL POINTER EXCEPTION <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmln
-
Program monitor and source monitor display issues
Hello, my program monitor is displaying strange colours (inverted?) when playing video. In addition, the source monitor will never display any video although audio plays back fine. I am running on a Lenovo ThinkPad X200 laptop with Windows XP 32-bit