How to multiply two collumn in collection.

hi
i am using collection for creating a bill .Now i want to calculate Total Amount = Quantity * Rate .
Here APEX_ITEM.TEXT(9,a.c008) c008 is use for Quantity,
This is use for Rate APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',) c009,
This is use for Total Amount Column APEX_ITEM.TEXT(11,a.c010) c010
This is my Collection code
select APEX_ITEM.HIDDEN(1,SEQ_ID),
APEX_ITEM.TEXT(2,a.c001) c001,
APEX_ITEM.TEXT(3,a.c002) c002,
APEX_ITEM.TEXT(4,a.c003) c003,
APEX_ITEM.TEXT(5,a.c004) c004,
APEX_ITEM.SELECT_LIST_FROM_QUERY(6,a.c005,'SELECT ITEM_GROUP D,ITEM_GROUP R FROM ITEM_GROUP_DETAILS order by ITEM_GROUP',
'style="width:110px" '
||'onchange="get_select_list_xml(this,''f7_'|| LPAD (seq_id, 4, '0')
||''')"',
'YES',
'0',
'-Select-',
'f6_'|| LPAD (seq_id, 4, '0'),
NULL,
'NO') c005,
APEX_ITEM.SELECT_LIST_FROM_QUERY(7,a.c006,'SELECT ITEM_NAME D,ITEM_NAME R FROM ITEM_DETAILS WHERE ITEM_GROUP =''' || a.c005|| '''' ,
'style="width:110px"'
||'onchange="get_select_list_xml21(this,''f10_'|| LPAD (seq_id, 4, '0')
||''')"',
'YES',
'0',
'-Select Name -',
'f7_' || LPAD (seq_id, 4, '0'),
NULL,
'NO') c006,
APEX_ITEM.TEXT(8,a.c007) c007,
APEX_ITEM.TEXT(9,a.c008) c008,
APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT RATE D, RATE R FROM ITEM_DETAILS WHERE ITEM_NAME =''' || a.c006|| '''',
'style="width:110px"',
'YES',
'0',
'-Select Rate -',
'f10_' || LPAD (seq_id, 4, '0'),
NULL,
'NO') c009,
APEX_ITEM.TEXT(11,a.c010) c010
FROM APEX_collections a
where a.collection_name = 'ABC'
For With out Refresh I am using
<script>
function amtItems(){
function getVal(item){
if($x(item).value != "")
return parseFloat($x(item).value);
else
return 0;
$x('c010').value = getVal('c008') * getVal('c009');
</script>
How Can i Multiply Quantity * Rate in to total Amount Column Without Refresh.
How can i use onBlur="javascript:amtItems()" in collection.
Thanks
Manoj Kaushik
Edited by: Manoj Kaushik on Mar 4, 2010 1:37 AM

Hi,
Call a PERFORM in ur form with 2 Using paramters (&RESBD-MENGE(C)&, &RESBD-GPREIS&) and use another changing parameter to get the value after multiplying above two. Define this PERFORM in driver program.
Eg:
In Script:
DEFINE : &tot_value&
PERFORM z_total_value IN PROGRAM z_cal_total USING &RESBD-MENGE& &RESBD-GPREIS&
                                    changing &tot_value&
In Program z_cal_total:
FORM z_total_value using in_tab structure itcsy
                           changing out_tab structure itcsy.
data : lv_menge TYPE resbd-menge,
          lv_gpreis TYPE resbd-gpreis,
          lv_total TYPE resbd-menge.
READ table in_tab with KEY name = 'RESBD-MENGE'.
IF sy-subrc EQ 0
  lv_menge = in_tab-value.
ENDIF.
READ table in_tab with KEY name = 'RESBD-GPREIS'.
IF sy-subrc EQ 0
  lv_gpreis = in_tab-value.
ENDIF.
READ table out_tab with KEY name = 'TOT_VLAUE'.
IF sy-subrc EQ 0.
  lv_total = lv_menge * lv_gperis.
   out_tab-value = lv_total.
MODIFY out_tab transporting fields value.
ENDIF.
ENDFORM.
Hope it helps!!
Rgds,
Pavan

Similar Messages

  • How can i multiply two column in collection .

    hi
    how can i use onBlur="javascript:amtItems()" in collection .
    <script>
    function amtItems(){
    function getVal(item){
    if($x(item).value != "")
    return parseFloat($x(item).value);
    else
    return 0;
    $x('c010').value = getVal('c008') * getVal('c009');
    </script>
    Manoj Kaushik

    Is this related to a tabular form? You can get some help here:
    http://apex.oracle.com/pls/otn/f?p=31517:213
    Ths syntax of your javascript would be:
    $x('f03_0001').value = getVal('f03_0002') * getVal('f03_0003');
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to use DoubleBinding to multiply two TextFields in javafx fxml appl

    Hi everyone!
    I want to multiply two TextFields created with Scene Builder.
    how to use DoubleBinding to multiply two TextFields in javafx fxml application.
    I shall be very gratefull to you for this guidance.
    Regards
    Tanvir

    Hi tanvir,
    I don't think it is pretty hard. Here is simple code below which grabs the value of Textfield and sums them up and update to the DoubleProperty.
    //t1: TextField
    //t2: TextField
    //sumProperty :DoubleProperty
    double sum = 0;
    try{
         double d1 = Double.parseDouble( t1.getText());
         double d2 = Double.parseDouble( t2.getText());
         sum = d1+d2;
         sumProperty.set(sum);
    }catch(NumberFormatException nfe){
         nfe.printStackTrace();
    }   Thanks
    Narayan

  • A lot of time to multiply two arrays

    Hello!
    I want to multiply two arrays. The size of the two arrays is 1568x1568. I use to do it a AxB.vi block....but it spends a huge time, almost 17 seconds, when a operation like this have to be done it less than in a second.
    I 've attached an example of the multiplication of two arrays with this size, you have to wait 16 seconds to obatin the result.
    Someone know how i can do this multiplication as far as possible?I have to use another block.....for example....formula node and make iterations (or in this way you spend the same time?)
    Thank you very much
    Larson

    Nomis wrote:
    On my system (P4, 2.6GHz, 1GB Ram Win2K), the example runs in 19 seconds in LV7.0 but in 7.1 it runs in 300mS!
    No idea why - perhaps the AxB function was rewritten for 7.1
    Yes the matrix operations got a big makeover in LabVIEW 7.1 and are MUCH faster as demonstrated here.
    On my 1.6GHz PentiumM laptop, the difference is not that big, but still about 10x.
    LabVIEW 7.0: 3700ms
    LabVIEW 7.1: 360ms
    Time to upgrade!
    LabVIEW Champion . Do more with less code and in less time .

  • I do not know how to multiply

    I have 994 cells in a column. I want to multiply the number in each one by a specific number, call it X.
    I have never used a formula in a spreadsheet before. I assumed the Fx "Product" was a good choice, I typed = into the first cell in the column, inserted PRODUCT and then typed (C), which is the column heading and then X) So in the formula bar I had: "=PRODUCT(C,X)" and every time I get a red arrow in that cell stating that "This formula can't reference its own cell, or depend on another formula that references this cell."
    I have tried to use other cells, same problem, I tried an empty cell at the top and bottom of the column, I tried using the name of the column instead of the letter. I tried using the operator as in (C*X). I also tried using (C1:C994, X) In short I have tried everything I can find in the manuals re: how to do this and it may be real elementary but apparently I cannot get it to work.
    And I lied, I do know how to multiply, I was just hoping to not have to multiply all 994 cells myself one at a time, Can someone please help. Thanx.

    DrSpock wrote:
    I have 994 cells in a column. I want to multiply the number in each one by a specific number, call it X.
    I have never used a formula in a spreadsheet before. I assumed the Fx "Product" was a good choice, I typed = into the first cell in the column, inserted PRODUCT and then typed (C), which is the column heading and then X) So in the formula bar I had: "=PRODUCT(C,X)" and every time I get a red arrow in that cell stating that "This formula can't reference its own cell, or depend on another formula that references this cell."
    Hi DrSpock,
    I'm guessing you entered the formula into column C. Placed in C5, for example, it says "multiply the number in C5 by the number in X5 and put the product in C5. The formula won't work as it tries to use the 'number' (actually, the result of a formula) in C5 as a factor used to produce the number in C5.
    =PRODUCT(C,X) can be placed into any column except C or X, and will give the product of the numbers in column C and column X in the row containing the formula. Placed in column M, it will give the results shown for the data entered in columns C and X:
    C ... M ... X
    1 ... 5 ... 5
    5 ...10 ... 2
    3 ... 9 ... 3
    For simple multiplication of two values, using the multiplcation operator ( * ), as Badunit suggested, is the simpler route.
    Regards,
    Barry

  • How to add two zeros end of field

    how to add two zeros end of field?

    Hi srinu,
    If it's a number field, then just multiply by 100.
    If it's a string, then just use CONCATENATE and add the '00' to your existing string.
    Hope this helps.
    SL

  • How to dispaly two dicimal points

    How to dispaly two dicimal points in java (Example 1) 5.70 Example 2) 561 but it should display as 561.00)
    Example1) Here I am able to display 5.7 but it should display as 5.70
    Example 2) Here I am able to display 561 but it should display as 561.00
    Following is the code I wrote
    package oracle.apps.ont.margin.server;
    import java.text.NumberFormat;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    public class GetOrderLineDetailsVORowImpl extends OAViewRowImpl
    public GetOrderLineDetailsVORowImpl()
    mDECIMAL_PLACES = 2;
    public Number getHeaderId()
    return (Number)getAttributeInternal(0);
    public void setHeaderId(Number value)
    setAttributeInternal(0, value);
    public Number getLineId()
    return (Number)getAttributeInternal(1);
    public void setLineId(Number value)
    setAttributeInternal(1, value);
    public Number getLineTypeId()
    return (Number)getAttributeInternal(2);
    public void setLineTypeId(Number value)
    setAttributeInternal(2, value);
    public String getLineNumber()
    return (String)getAttributeInternal(3);
    public void setLineNumber(String value)
    setAttributeInternal(3, value);
    public String getOrderedItem()
    return (String)getAttributeInternal(4);
    public void setOrderedItem(String value)
    setAttributeInternal(4, value);
    public String getOrderQuantityUom()
    return (String)getAttributeInternal(5);
    public void setOrderQuantityUom(String value)
    setAttributeInternal(5, value);
    public Number getPricingQuantity()
    return (Number)getAttributeInternal(6);
    public void setPricingQuantity(Number value)
    setAttributeInternal(6, value);
    public String getPricingQuantityUom()
    return (String)getAttributeInternal(7);
    public void setPricingQuantityUom(String value)
    setAttributeInternal(7, value);
    public Number getOrderedQuantity()
    return (Number)getAttributeInternal(8);
    public void setOrderedQuantity(Number value)
    setAttributeInternal(8, value);
    public Number getUnitSellingPrice()
    return (Number)getAttributeInternal(9);
    public void setUnitSellingPrice(Number value)
    setAttributeInternal(9, value);
    public Number getUnitListPrice()
    return (Number)getAttributeInternal(10);
    public void setUnitListPrice(Number value)
    setAttributeInternal(10, value);
    public String getItemTypeCode()
    return (String)getAttributeInternal(11);
    public void setItemTypeCode(String value)
    setAttributeInternal(11, value);
    public String getLineCategoryCode()
    return (String)getAttributeInternal(12);
    public void setLineCategoryCode(String value)
    setAttributeInternal(12, value);
    public String getItemIdentifierType()
    return (String)getAttributeInternal(13);
    public void setItemIdentifierType(String value)
    setAttributeInternal(13, value);
    public Number getUnitCost()
    return (Number)getAttributeInternal(14);
    public void setUnitCost(Number value)
    setAttributeInternal(14, value);
    public Number getRebate()
    return (Number)getAttributeInternal(15);
    public void setRebate(Number value)
    setAttributeInternal(15, value);
    public Number getDiscount()
    Number vUnitListPrice = getUnitListPrice();
    if(vUnitListPrice == null)
    vUnitListPrice = new Number(0);
    Number vUnitSellingPrice = getUnitSellingPrice();
    if(vUnitSellingPrice == null)
    vUnitSellingPrice = new Number(0);
    Number vRebate = getRebate();
    if(vRebate == null)
    vRebate = new Number(0);
    double discount = (vUnitListPrice.doubleValue() - vUnitSellingPrice.doubleValue()) + vRebate.doubleValue();
    if(discount < (double)0)
    discount = 0.0D;
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    try
    Number number = new Number(form.parse(form.format(discount)));
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    public void setDiscount(Number value)
    setAttributeInternal(16, value);
    public Number getMargin()
    Number vUnitSellingPrice = getUnitSellingPrice();
    if(vUnitSellingPrice == null)
    vUnitSellingPrice = new Number(0);
    Number vRebate = getRebate();
    if(vRebate == null)
    vRebate = new Number(0);
    Number vUnitCost = getUnitCost();
    if(vUnitCost == null)
    vUnitCost = new Number(0);
    try
    Number vMargin = new Number((vUnitSellingPrice.doubleValue() + vRebate.doubleValue()) - vUnitCost.doubleValue());
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    Number number = new Number(form.parse(form.format(vMargin.doubleValue())));
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    public void setMargin(Number value)
    setAttributeInternal(17, value);
    public Number getExtendedListPrice()
    if(getUnitListPrice() != null && getPricingQuantity() != null)
    return getUnitListPrice().multiply(getPricingQuantity());
    else
    return new Number(0);
    public void setExtendedListPrice(Number value)
    setAttributeInternal(18, value);
    public Number getExtendedDiscount()
    if(getDiscount() != null && getPricingQuantity() != null)
    return getDiscount().multiply(getPricingQuantity());
    else
    return new Number(0);
    public void setExtendedDiscount(Number value)
    setAttributeInternal(19, value);
    public Number getExtendedRebate()
    if(getPricingQuantity() != null && getRebate() != null)
    return getPricingQuantity().multiply(getRebate());
    else
    return new Number(0);
    public void setExtendedRebate(Number value)
    setAttributeInternal(20, value);
    public Number getExtendedSellingPrice()
    if(getUnitSellingPrice() != null && getPricingQuantity() != null)
    return getUnitSellingPrice().multiply(getPricingQuantity());
    else
    return new Number(0);
    public void setExtendedSellingPrice(Number value)
    setAttributeInternal(21, value);
    public Number getExtendedCost()
    if(getUnitCost() != null && getPricingQuantity() != null)
    return getUnitCost().multiply(getPricingQuantity());
    else
    return new Number(0);
    public void setExtendedCost(Number value)
    setAttributeInternal(22, value);
    public Number getExtendedMargin()
    if(getPricingQuantity() != null && getTempMargin() != null)
    try
    Number vMargin = getTempMargin().multiply(getPricingQuantity());
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    Number number = new Number(form.parse(form.format(vMargin.doubleValue())));
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    else
    return new Number(0);
    public void setExtendedMargin(Number value)
    setAttributeInternal(23, value);
    public Number getMarginPercent()
    double vMarginAmount = 0.0D;
    vMarginAmount = getUnitSellingPrice().doubleValue();
    if(vMarginAmount == (double)0)
    return new Number(100);
    vMarginAmount = (getMargin().doubleValue() * (double)100) / vMarginAmount;
    Number marginPercent = null;
    try
    marginPercent = new Number(vMarginAmount);
    catch(Exception e)
    e.printStackTrace();
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    try
    Number number = new Number(form.parse(form.format(marginPercent.doubleValue())));
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    public void setMarginPercent(Number value)
    setAttributeInternal(24, value);
    protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef)
    throws Exception
    switch(index)
    case 0: // '\0'
    return getHeaderId();
    case 1: // '\001'
    return getLineId();
    case 2: // '\002'
    return getLineTypeId();
    case 3: // '\003'
    return getLineNumber();
    case 4: // '\004'
    return getOrderedItem();
    case 5: // '\005'
    return getOrderQuantityUom();
    case 6: // '\006'
    return getPricingQuantity();
    case 7: // '\007'
    return getPricingQuantityUom();
    case 8: // '\b'
    return getOrderedQuantity();
    case 9: // '\t'
    return getUnitSellingPrice();
    case 10: // '\n'
    return getUnitListPrice();
    case 11: // '\013'
    return getItemTypeCode();
    case 12: // '\f'
    return getLineCategoryCode();
    case 13: // '\r'
    return getItemIdentifierType();
    case 14: // '\016'
    return getUnitCost();
    case 15: // '\017'
    return getRebate();
    case 16: // '\020'
    return getDiscount();
    case 17: // '\021'
    return getMargin();
    case 18: // '\022'
    return getExtendedListPrice();
    case 19: // '\023'
    return getExtendedDiscount();
    case 20: // '\024'
    return getExtendedRebate();
    case 21: // '\025'
    return getExtendedSellingPrice();
    case 22: // '\026'
    return getExtendedCost();
    case 23: // '\027'
    return getExtendedMargin();
    case 24: // '\030'
    return getMarginPercent();
    case 25: // '\031'
    return getExtendedMarginPercent();
    case 26: // '\032'
    return getTempMargin();
    return super.getAttrInvokeAccessor(index, attrDef);
    protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef)
    throws Exception
    switch(index)
    case 0: // '\0'
    setHeaderId((Number)value);
    return;
    case 1: // '\001'
    setLineId((Number)value);
    return;
    case 2: // '\002'
    setLineTypeId((Number)value);
    return;
    case 3: // '\003'
    setLineNumber((String)value);
    return;
    case 4: // '\004'
    setOrderedItem((String)value);
    return;
    case 5: // '\005'
    setOrderQuantityUom((String)value);
    return;
    case 6: // '\006'
    setPricingQuantity((Number)value);
    return;
    case 7: // '\007'
    setPricingQuantityUom((String)value);
    return;
    case 8: // '\b'
    setOrderedQuantity((Number)value);
    return;
    case 9: // '\t'
    setUnitSellingPrice((Number)value);
    return;
    case 10: // '\n'
    setUnitListPrice((Number)value);
    return;
    case 11: // '\013'
    setItemTypeCode((String)value);
    return;
    case 12: // '\f'
    setLineCategoryCode((String)value);
    return;
    case 13: // '\r'
    setItemIdentifierType((String)value);
    return;
    case 14: // '\016'
    setUnitCost((Number)value);
    return;
    case 15: // '\017'
    setRebate((Number)value);
    return;
    case 16: // '\020'
    setDiscount((Number)value);
    return;
    case 17: // '\021'
    setMargin((Number)value);
    return;
    case 18: // '\022'
    setExtendedListPrice((Number)value);
    return;
    case 19: // '\023'
    setExtendedDiscount((Number)value);
    return;
    case 20: // '\024'
    setExtendedRebate((Number)value);
    return;
    case 21: // '\025'
    setExtendedSellingPrice((Number)value);
    return;
    case 22: // '\026'
    setExtendedCost((Number)value);
    return;
    case 23: // '\027'
    setExtendedMargin((Number)value);
    return;
    case 24: // '\030'
    setMarginPercent((Number)value);
    return;
    case 25: // '\031'
    setExtendedMarginPercent((Number)value);
    return;
    case 26: // '\032'
    setTempMargin((Number)value);
    return;
    super.setAttrInvokeAccessor(index, value, attrDef);
    public Number getExtendedMarginPercent()
    double vMarginAmount = 0.0D;
    Number vUnitSellingPrice = getUnitSellingPrice();
    if(vUnitSellingPrice == null)
    vUnitSellingPrice = new Number(0);
    Number vRebate = getRebate();
    if(vRebate == null)
    vRebate = new Number(0);
    vMarginAmount = vUnitSellingPrice.doubleValue() + vRebate.doubleValue();
    if(vMarginAmount == (double)0)
    return new Number(100);
    Number vMargin = getMargin();
    if(vMargin == null)
    vMargin = new Number(0);
    vMarginAmount = (vMargin.doubleValue() * (double)100) / vMarginAmount;
    Number marginPercent = null;
    try
    marginPercent = new Number(vMarginAmount);
    catch(Exception e)
    e.printStackTrace();
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    try
    Number number = new Number(form.parse(form.format(marginPercent.doubleValue())));
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    public void setExtendedMarginPercent(Number value)
    setAttributeInternal(25, value);
    public Number getTempMargin()
    Number vUnitSellingPrice = getUnitSellingPrice();
    if(vUnitSellingPrice == null)
    vUnitSellingPrice = new Number(0);
    Number vRebate = getRebate();
    if(vRebate == null)
    vRebate = new Number(0);
    Number vUnitCost = getUnitCost();
    if(vUnitCost == null)
    vUnitCost = new Number(0);
    try
    Number vTempMargin = new Number((vUnitSellingPrice.doubleValue() + vRebate.doubleValue()) - vUnitCost.doubleValue());
    Number number = vTempMargin;
    return number;
    catch(Exception e)
    throw OAException.wrapperException(e);
    public void setTempMargin(Number value)
    setAttributeInternal(26, value);
    protected static final int HEADERID = 0;
    protected static final int LINEID = 1;
    protected static final int LINETYPEID = 2;
    protected static final int LINENUMBER = 3;
    protected static final int ORDEREDITEM = 4;
    protected static final int ORDERQUANTITYUOM = 5;
    protected static final int PRICINGQUANTITY = 6;
    protected static final int PRICINGQUANTITYUOM = 7;
    protected static final int ORDEREDQUANTITY = 8;
    protected static final int UNITSELLINGPRICE = 9;
    protected static final int UNITLISTPRICE = 10;
    protected static final int ITEMTYPECODE = 11;
    protected static final int LINECATEGORYCODE = 12;
    protected static final int ITEMIDENTIFIERTYPE = 13;
    protected static final int UNITCOST = 14;
    protected static final int REBATE = 15;
    protected static final int DISCOUNT = 16;
    protected static final int MARGIN = 17;
    protected static final int EXTENDEDLISTPRICE = 18;
    protected static final int EXTENDEDDISCOUNT = 19;
    protected static final int EXTENDEDREBATE = 20;
    protected static final int EXTENDEDSELLINGPRICE = 21;
    protected static final int EXTENDEDCOST = 22;
    protected static final int EXTENDEDMARGIN = 23;
    protected static final int MARGINPERCENT = 24;
    protected static final int EXTENDEDMARGINPERCENT = 25;
    protected static final int TEMPMARGIN = 26;
    int mDECIMAL_PLACES;
    package oracle.apps.ont.margin.server;
    import java.text.NumberFormat;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.jbo.ViewLink;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ApplicationModuleImpl;
    import oracle.jbo.server.ViewLinkImpl;
    // Referenced classes of package oracle.apps.ont.margin.server:
    // GetOrderLineDetailsVOImpl, GetOrderLineDetailsVORowImpl, GetOrderHeadersVOImpl
    public class MaintainOrdersAMImpl extends OAApplicationModuleImpl
    public MaintainOrdersAMImpl()
    mDECIMAL_PLACES = 2;
    public String computeMarginPercent()
    double dTotalSellPrice = 0.0D;
    double dTotalRebate = 0.0D;
    double dTotalMargin = 0.0D;
    GetOrderLineDetailsVORowImpl orderlineRow = null;
    GetOrderLineDetailsVOImpl orderVO = (GetOrderLineDetailsVOImpl)findViewObject("GetOrderLineDetailsVO");
    orderVO.reset();
    while(orderVO.hasNext())
    orderlineRow = (GetOrderLineDetailsVORowImpl)orderVO.next();
    dTotalSellPrice += orderlineRow.getExtendedSellingPrice().doubleValue();
    dTotalRebate += orderlineRow.getExtendedRebate().doubleValue();
    dTotalMargin += orderlineRow.getExtendedMargin().doubleValue();
    NumberFormat form = NumberFormat.getInstance();
    form.setMaximumFractionDigits(mDECIMAL_PLACES);
    return form.format((dTotalMargin * 100D) / dTotalSellPrice);
    public void getContextInfo(String pHeaderId)
    GetOrderHeadersVOImpl orderVO = (GetOrderHeadersVOImpl)findViewObject("GetOrderHeadersVO");
    if(orderVO != null)
    try
    Number numHeaderId = new Number(pHeaderId);
    orderVO.initQuery(numHeaderId);
    orderVO.reset();
    orderVO.next();
    oracle.jbo.Row ro = orderVO.getCurrentRow();
    if(ro != null)
    GetOrderLineDetailsVOImpl linesVO = (GetOrderLineDetailsVOImpl)findViewLink("HeaderToLinesVL1").getDestination();
    if(linesVO != null)
    linesVO.first();
    catch(Exception exception) { }
    public GetOrderHeadersVOImpl getGetOrderHeadersVO()
    return (GetOrderHeadersVOImpl)findViewObject("GetOrderHeadersVO");
    public GetOrderLineDetailsVOImpl getGetOrderLineDetailsVO()
    return (GetOrderLineDetailsVOImpl)findViewObject("GetOrderLineDetailsVO");
    public ViewLinkImpl getHeaderToLinesVL1()
    return (ViewLinkImpl)findViewLink("HeaderToLinesVL1");
    public static void main(String args[])
    ApplicationModuleImpl.launchTester("oracle.apps.ont.margin.server", "MaintainOrdersAMLocal");
    int mDECIMAL_PLACES;
    Please help me in this regard.
    Thanks in advance.

    hi,
    With this code u can show 451 as 451.0
    see my it will help u.
    import java.util.*;
    import java.text.*;
    public class DecimalFormatDemo {
    static public void customFormat(String pattern, double value ) {
    DecimalFormat myFormatter = new DecimalFormat(pattern);
    String output = myFormatter.format(value);
    System.out.println(value + " " + pattern + " " + output);
    static public void main(String[] args) {
    customFormat("######.##", 123456);
    }

  • How do you delete folders within collections in mini bridge?

    How do you delete folders within collections in mini bridge?

    his chapter on Mini Bridge where he talks about organizing your photos getting rid of some and making a folder or file sorry not certain of the terminology under Collections in mini bridge to acess your "keepers" perse.
    Not familiar with this book but if Scott is talking about using mini bridge for sorting images he is way out of line. Mini Bridge (to my opinion next to useless since they screwed it up for CS6 but that is another discussion) should be seen as a shortcut to Bridge itself when working in Photoshop on complex tasks of image or album compilation and prevent you from switching back and forward between the two applications while working on a project.
    Unfortunately some people thought that it might be useful to add more functions to it and now users start believing they don't need bridge itself for this.
    Please use Bridge itself for sorting etc and also try to get hold of a copy of 'Real World Camera Raw' written by Bruce Fraser and Jeff Schewe. They have an edition for about all CS versions and this book will let you know how to really use the power of Bridge and Adobe Camera Raw

  • [b]how to multiply 2 matrices???[/b]

    ]java application program to multiply two matrices A and B and output the product matrix C. Matrix A must have the same
    number of columns as matrix B has rows. The maximum matrix sizes are 5�5. When forming the product C of two matrices A and B, the elements of the product matrix C are calculated as follows:
    For example, if
    matrixA = 2 � 3
    matrixB = 3 � 3
    then:
    matrixC = 2 � 3
    matrix A: matrix B: matrix C:
    A00 A01 A02 B00 B01 B02 C00 C01 C02
    A10 A11 A12 * B10 B11 B12 = C10 C11 C12
    B20 B21 B22
    matrixC[0][0]= matrixA[0][0] � matrixB[0][0] +
    matrixA[0][1] � matrixB[1][0] +
    matrixA[0][2] � matrixB[2][0] +
    matrixC[0][1]= matrixA[0][0] � matrixB[0][1] +
    matrixA[0][1] � matrixB[1][1] +
    matrixA[0][2] � matrixB[2][1] +
    matrixC[0][2]= matrixA[0][0] � matrixB[0][2] +
    matrixA[0][1] � matrixB[1][2] +
    matrixA[0][2] � matrixB[2][2] +
    matrixC[1][0]= matrixA[1][0] � matrixB[0][0] +
    matrixA[1][1] � matrixB[1][0] +
    matrixA[1][2] � matrixB[2][0] +
    matrixC[1][1]= matrixA[1][0] � matrixB[0][1] +
    matrixA[1][1] � matrixB[1][1] +
    The output looks like
    Matrix:A
    1.0 2.0 3.0
    4.0 5.0 6.0
    Matrix:B
    7.0 8.0 9.0
    0.0 9.0 8.0
    7.0 6.0 5.0
    Product of A and B:
    28.0 44.0 40.0
    70.0 113.0 106.0
    � If you declare array A and B as float, the array C should be
    declared as double. If you declare array A and B as int, the
    array C should be declared as long.
    � Check the formula and examples for calculating the elements
    of matrix C. How many nested loops should be used?
    � How to declare and create multidimensional arrays?
    � How to obtain the number of rows and columns in a double
    dimensional array?

    I am doing my best....my friend....but this is as far as i got....can you give me some directions....here are my codes....thanks
    //import java.lang.*;
    import java.math.*;
    import java.io.*;
    class MatMulti extends Thread
    static int in1[][];
    static int in2[][];
    static int out[][];
    static int n=2;
    int row;
    MatMulti(int i)
    row=i;
    this.start();
    public void run()
    int i,j;
    for(i=0;i<n;i++)
    out[row]=0;
    for(j=0;j<n;j++)
    out[row][i]=out[row][i]+in1[row][j]*in2[j][i];
    public static void main(String args[])
    int i,j;
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter the order of Matrix A : ");
    try
    n=Integer.parseInt(br.readLine());
    }catch(Exception e){}
    in1=new int[n][n];
    in2=new int[n][n];
    out=new int[n][n];
    System.out.println("Enter the First Matrix : ");
    for(i=0;i<n;i++)
    for(j=0;j<n;j++)
    try
    in1[i][j]=Integer.parseInt(br.readLine());
    }catch(Exception e){}
    System.out.println("Enter the Second Matrix : ");
    for(i=0;i<n;i++)
    for(j=0;j<n;j++)
    try
    in2[i][j]=Integer.parseInt(br.readLine());
    }catch(Exception e){}
    MatMulti mat[]=new MatMulti[n];
    for(i=0;i<n;i++)
    mat[i]=new MatMulti(i);
    try
    for(i=0;i<n;i++)
    mat[i].join();
    }catch(Exception e){}
    System.out.println("OUTPUT :");
    for(i=0;i<n;i++)
    for(j=0;j<n;j++)
    System.out.println(out[i][j]);

  • Hibernate query...how to connect two databases...

    hi i m new to hibernate..
    i created two tables..
    1st table is catalog:
    2nd table is acctinfo
    //HBM file is :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class name="hibernate.example.Catalog" table="catalog">
    <id name="id" type="integer" column="ID">
    <generator class="increment"/>
    </id>
    <property name="journal" type="string" column="JOURNAL"/>
    <property name="publisher" type="string" column="PUBLISHER"/>
    <property name="edition" type="string" column="EDITION"/>
    <property name="title" type="string" column="TITLE"/>
    <property name="author" type="string" column="AUTHOR"/>
    <bag name="accinfo" cascade="all" >
    <key column="ID"/>
    <one-to-many class="hibernate.example.Acctinfo"/>
    </bag>
    </class>
    <class name="hibernate.example.Acctinfo" table="acctinfo">
    <id name="id" type="integer" column="ID">
    <generator class="increment"/>
    </id>
    <property name="account" type="string" column="ACCOUNT"/>
    <property name="password" type="string" column="PASSWORD"/>
    <property name="balance" type="string" column="BALANCE"/>
    </class>
    </hibernate-mapping>
    ///******************getter setter file is::****************
    package hibernate.example;
    public class Acctinfo
         int id;
         String account;
         String password;
         String balance;
         public Acctinfo()
         public void setId(int id)
              this.id = id;
         public int getId()
              return id;
         public void setAccount(String account)
              this.account = account;
         public void setPassword(String password)
              this.password = password;
         public void setBalance(String balance)
              this.balance = balance;
         public String getAccount()
              return account;
         public String getBalance()
              return balance;
         public String getPassword()
              return password;
    //********************2nd getter setter file is:***********************
    package hibernate.example;
    import java.util.List;
    public class Catalog
    int id;
    String journal;
    String publisher;
    String edition;
    String title;
    String author;
    private List accinfo;
    public Catalog()
    public void setId(int id)
    this.id = id;
    public int getId()
    return id;
    public void setJournal(String journal)
    this.journal = journal;
    public String getJournal()
    return journal;
    public void setPublisher(String publisher)
    this.publisher = publisher;
    public String getPublisher()
    return publisher;
    public void setEdition(String edition)
    this.edition = edition;
    public String getEdition()
    return edition;
    public void setTitle(String title)
    this.title = title;
    public String getTitle()
    return title;
    public void setAuthor(String author)
    this.author = author;
    public String getAuthor()
    return author;
    public void setAccinfo(List accinfo)
    this.accinfo = accinfo;
    public List getAccinfo()
    return accinfo;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package hibernate.example;
    import hibernate.example.Acctinfo;
    import hibernate.example.Catalog;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import java.util.ListIterator;
    import org.hibernate.Query;
    import org.hibernate.SQLQuery;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    public class CatalogClient
         Session session = null;
         SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
         public static void main(String str[])
              CatalogClient clc = new CatalogClient();
              //clc.saveData();
              //clc.deleteData();
              //clc.showData();
              clc.updateData();
         public void showData()
              try
                   session =sessionFactory.openSession();
                   String SQL_QUERY ="select id, journal, publisher, edition, title, author from catalog";
                   // String SQL_QUERY ="select c.ID, c.JOURNAL, c.PUBLISHER, c.EDITION, c.TITLE, c.AUTHOR, a.ACCOUNT, a.PASSWORD,a.BALANCE from catalog c, ACCTINFO a where c.ID = a.ID";
                   SQLQuery query = session.createSQLQuery(SQL_QUERY);
                   System.out.println("*** query : *** "+ query);
                   //for(ListIterator it=query.list().listIterator();it.hasNext();)
                   for (ListIterator lit = query.list().listIterator(); lit.hasNext();)
                        Object[] row = (Object[]) lit.next();
                        /*System.out.println("ID: " + row[0]);
                        System.out.println("Title: " + row[1]);
                        System.out.println("Author: " + row[2]);
                        System.out.println("Isbn: " + row[3]);
                        System.out.println("Pages: " + row[4]);
                        System.out.println("Copyright: " + row[5]);
                        System.out.println("Cost: " + row[6]);
                        System.out.println("******NEXT****************");
    Object[] row = (Object[]) it.next();*/
                        System.out.println("ID: " + row[0]);
                        System.out.println("JOURNAL: " + row[1]);
                        System.out.println("PUBLISHER: " + row[2]);
                        System.out.println("EDITION: " + row[3]);
                        System.out.println("TITLE: " + row[4]);
                        System.out.println("AUTHOR: " + row[5]);
                        System.out.println("acc: " + row[6]);
                        System.out.println("pass: " + row[7]);
                        System.out.println("bal: " + row[8]);
                        System.out.println("***************************");
                   session.close();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void saveData()
              session =sessionFactory.openSession();
              Transaction transaction = null;
              transaction = session.beginTransaction();
              Catalog catalog = setBean();
              //System.out.println("before save");
              session.save(catalog);
              //System.out.println("after save");
              transaction.commit();
              session.flush();
              session.close();
         public void updateData()
              session =sessionFactory.openSession();
              Catalog catalog = new Catalog();
              catalog.setId(2);
              catalog.setAuthor("manoj");
              catalog.setJournal("java");
              catalog.setEdition("1st");
              catalog.setPublisher("indiabulls");
              catalog.setTitle("java Servlet");
              session.update(catalog);
              session.flush();
              session.close();
         public void deleteData()
              session =sessionFactory.openSession();
              Catalog catalog = new Catalog();
              catalog.setId(3);
              session.delete(catalog);
              session.flush();
              session.close();
         public static Catalog setBean()
              Acctinfo accinfo = new Acctinfo();
              accinfo.setAccount("MANOJ1");
              accinfo.setPassword("orbis");
              accinfo.setBalance("1000");
              List list = new ArrayList();
              list.add(accinfo);
              Catalog catalog = new Catalog();
              catalog.setJournal("india");
              catalog.setPublisher("indiabulls");
              catalog.setEdition("ist");
              catalog.setTitle("orbis");
              catalog.setAuthor("manoj");
              catalog.setAccinfo(list);
              return catalog;
    //********************CFG FILE IS ******************
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory name="session">
    <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
    <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
    <property name="hibernate.connection.url">jdbc:oracle:thin:@172.16.31.25:1521:BOMBAY</property>
    <property name="hibernate.connection.username">mumbai</property>
    <property name="hibernate.connection.password">mumbai123</property>
    <!-- Set AutoCommit to true -->
    <property name="connection.autocommit">true</property>
    <property name="dialect">org.hibernate.dialect.OracleDialect</property>
    <!-- Mapping files -->
    <mapping resource="Catalog.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    **********************error i m facing is :************************
    0 [main] WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Documents%20and%20Settings/d.poonam/Desktop/hibernate/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
    1188 [main] WARN org.hibernate.impl.SessionFactoryObjectFactory - Could not bind factory to JNDI
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getNameParser(Unknown Source)
         at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
         at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
         at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:247)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043)
         at hibernate.example.CatalogClient.<init>(CatalogClient.java:24)
         at hibernate.example.CatalogClient.main(CatalogClient.java:27)
    please help me out....
    thanks in advance..
    if u know how to connect two tables plz let me know..
    its urgent....

    I made this work with MySQL. Adapt to your situation as needed. - %
    package hibernate.model;
    import hibernate.util.HibernateUtils;
    import hibernate.model.Catalog;
    import hibernate.model.Account;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.hibernate.Session;
    import hibernate.util.HibernateUtils;
    import static junit.framework.Assert.assertEquals;
    import static junit.framework.Assert.assertNotNull;
    public class CatalogTest
       private static final Log LOGGER = LogFactory.getLog(CatalogTest.class);
       public static void main(String[] args)
          Session session = null;
          try
             session = HibernateUtils.getSessionFactory().getCurrentSession();
             session.beginTransaction();
             int rowsBefore = HibernateUtils.getRowCount(session, Catalog.class);
             assertEquals("should not have any Catalogs", rowsBefore, 0);
             Catalog catalog = new Catalog("test title");
             catalog.addAccount(new Account(100));
             catalog.addAccount(new Account(200));
             Long id = (Long) session.save(catalog);
             assertNotNull("generated id should not be null", id);
             LOGGER.info("returned id: " + id);
             session.getTransaction().commit();
             LOGGER.debug("transaction committed");
          catch (Exception e)
             LOGGER.error(e);
             session.getTransaction().rollback();
    package hibernate.model;
    import java.io.Serializable;
    import java.text.NumberFormat;
    public class Account implements Serializable
       private Long id;
       private int balance;
       public Account()
          this(null, 0);
       public Account(int balance)
          this(null, balance);
       public Account(Long id, int balance)
          this.id = id;
          this.balance = balance;
       public Long getId()
          return id;
       private void setId(Long id)
          this.id = id;
       public int getBalance()
          return balance;
       private void setBalance(int balance)
          this.balance = balance;
       public boolean equals(Object o)
          if (this == o)
             return true;
          if (!(o instanceof Account))
             return false;
          Account account = (Account) o;
          return !(id != null ? !id.equals(account.id) : account.id != null);
       public int hashCode()
          int result;
          result = (id != null ? id.hashCode() : 0);
          result = 31 * result + balance;
          return result;
       public String toString()
          return new StringBuilder().append("Account{").append("id=").append(id).append(", balance=").append(NumberFormat.getCurrencyInstance().format(balance)).append('}').toString();
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping package="hibernate.model" default-access="field" default-lazy="true">
       <class name="Account" table="accounts">
          <id name="id" column="account_id">
             <generator class="native"/>
          </id>
          <property name="balance" column="balance"/>
       </class>
    </hibernate-mapping>
    package hibernate.model;
    import java.io.Serializable;
    import java.util.Set;
    import java.util.HashSet;
    import java.util.Collections;
    public class Catalog implements Serializable
       private Long id;
       private String title;
       private Set<Account> accounts;
       public Catalog()
          this(null, "", Collections.EMPTY_SET);
       public Catalog(String title)
          this(null, title, Collections.EMPTY_SET);
       public Catalog(Long id, String title, Set<Account> accounts)
          this.id = id;
          this.title = title;
          this.accounts = new HashSet<Account>(accounts);
       public Long getId()
          return id;
       private void setId(Long id)
          this.id = id;
       public String getTitle()
          return title;
       private void setTitle(String title)
          this.title = title;
       public Set<Account> getAccounts()
          return accounts;
       private void setAccounts(Set<Account> accounts)
          this.accounts = accounts;
       public void addAccount(Account account)
          this.getAccounts().add(account);
       public void removeAccount(Account account)
          this.getAccounts().remove(account);
       public boolean equals(Object o)
          if (this == o)
             return true;
          if (!(o instanceof Catalog))
             return false;
          Catalog catalog = (Catalog) o;
          return !(id != null ? !id.equals(catalog.id) : catalog.id != null);
       public int hashCode()
          return (id != null ? id.hashCode() : 0);
       public String toString()
          return new StringBuilder().append("Catalog{").append("id=").append(id).append(", title='").append(title).append('\'').append(", accounts=").append(accounts).append('}').toString();
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
          "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping package="hibernate.model" default-access="field" default-lazy="true">
       <class name="Catalog" table="catalogs">
          <id name="id" column="catalog_id">
             <generator class="native"/>
          </id>
          <property name="title" column="title"/>
          <set name="accounts" cascade="all">
             <key column="catalog_id"/>
             <one-to-many class="hibernate.model.Account"/>
          </set>
       </class>
    </hibernate-mapping>
    <!DOCTYPE hibernate-configuration PUBLIC
         "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
         "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
         <session-factory>
          <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
          <property name="connection.url">jdbc:mysql://localhost:3306/hibernate?autoReconnect=true</property>
          <property name="connection.username">hibernate</property>
          <property name="connection.password">hibernate</property>
          <property name="connection.pool_size">1</property>
          <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
          <property name="show_sql">true</property>
          <property name="generate_statistics">true</property>
          <property name="query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
          <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
          <property name="cache.use_minimal_puts">false</property>
          <property name="cache.use_query_cache">false</property>
          <property name="order_updates">false</property>
          <property name="hbm2ddl.auto">create-drop</property>
          <property name="current_session_context_class">thread</property>
          <mapping resource="hibernate/persistence/hibernate/Account.hbm.xml"/>
          <mapping resource="hibernate/persistence/hibernate/Catalog.hbm.xml"/>
         </session-factory>
    </hibernate-configuration>

  • Two RD SH collections – RD CB load balancing 2012 R2

    I have created two RD SH collections, because some applications are only available through  on SH collections.
    How will that  effect RD CB load balancing of RD SH servers  regarding common applications, not specific  one, based on  RemotApp programs.
    I did not deploy any DNS RR for RD SH. But I did deploy NLB for  RD Web and RD CB. 

    Hi,
    Thank you for posting in Windows Server Forum.
    Can you specify some more description regarding your case as actually what you want to perform?
    From your description seems you have installed one application as RemoteApp on both RDSH collections and you want that how they can be differentiated. If misunderstood then please correct. If that’s the case as described then you can assign the specific app
    of particular collection to the user whom you want. There is facility to assign RemoteApp user assignment and by that way the user can access\see the RemoteApp on RD Web access page.
    More information.
    Introducing RemoteApp User Assignment
    http://blogs.msdn.com/b/rds/archive/2009/06/12/introducing-remoteapp-user-assignment.aspx
    In addition you can go through this article for configuring and load balancing session collections.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Multiplying two values???

    Hello everyone, i am trying to simply multiply two values together, however one of my values is a BigDecimal and the other a string value, having never used a BigDecimal before could anyone tell me how i could manipulate the below snippet of code to allow the multiplication of the 2 values:
    BigDecimal price =(BigDecimal)(table.getValueAt(i,3));               
    String qty = (String)(table.getValueAt(i,4));
    System.out.println(price+"\t"+qty+"\t");//THIS DOES SHOW THE 2 VALUES     
    BigDecimal total = multiply(price);//CAN ANYONE HELP ME HERE MANIPULATING A BIGDECIMALThanks in advance to anyone who is willing to help me out!!!

    BigDecimal total = price.multiply(new BigDecimal(qty));

  • How to combine two datarows (business component data) in BI Publisher

    Hi ,
    We are using BI Publisher in Siebel Environment.
    We have data coming from two business components (like from 2 diff tables)
    a) <?for-each:ssTest1?>
    b) <?for-each:ssTest2?>
    ssTest1 and ssTest2 are the business components
    We need to combine these 2 datarows (a&b) and show the data into a single combined data row for ex like <?for-each:ssTest1ssTest2?> and show all the fields in that.
    I'm not sure how we can combine these two data rows into a single combined data row and show the data.
    Any help from any one would be apprecated.
    Thanks
    PV
    Edited by: user8633002 on Oct 21, 2010 4:05 PM

    Hi sajid
    There was nothing more description about your issue in this site and I found an issue below is mostly like yours
    http://www.codeproject.com/Questions/855487/how-to-combine-two-table-value-in-rdlc-report
    In the issue above, if you want to show the two other tables in the report, I think you could combine the tables into one datatable joining on key. The link below show an example of a DataSet Helper from Microsoft about combine DataSets. Take note of
    the related content for other DataSet Helper examples. And then you could use the datatable in your RDLC.
    # HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET
    http://support.microsoft.com/kb/326080/en-us
    In an alternative way, I think you could create a view in the database which combine your tables and use it in your rdlc.
    In addition, your issue is about asp.net and you could get more support in the asp.net forum whose link as below.
    http://forums.asp.net
    Best Regards
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • How do I get an ordered collection with a CMP relatioship?

    Hello,
    I'm actually learning to use CMP. I'm trying to read a list of items from a table. I defined a getItemCollection function, linked to a relationship defined in my ejb-jar.xml. When I call the getter function, It returns a randomly unordered collection. I was expecting to get the returned collection in natural order.
    So my question is:
    1) how do I get a collection of items in natural order with a relationship defined getter?
    2) how do I get an ordered collection from a relationship defined getter?
    If I would be using a ejbSelect function, I would use an "order by", but in this case, I couldn't find any information.
    Thanks for any help.

    #div1 {
        background: url(BG-img1.jpg) no-repeat center center fixed;
        /**for Safari,Chrome**/
        -webkit-background-size: cover;
        /**for Firefox**/
        -moz-background-size: cover;
        /**for Opera**/
        -o-background-size: cover;
        /**for other browsers**/
        background-size: cover;
    #div2 {
        background: url(BG-img2.jpg) no-repeat center center fixed;
        /**for Safari,Chrome**/
        -webkit-background-size: cover;
        /**for Firefox**/
        -moz-background-size: cover;
        /**for Opera**/
        -o-background-size: cover;
        /**for other browsers**/
        background-size: cover;
    HTML
    <div class="gridContainer clearfix">
         <div id="div1">
              div 1 content goes here....
         </div>
         <div id="div2:>
              div 2 content goes here...
         </div>
    </div>
    Nancy O.

  • How to use Two main windows with in a page in script ?

    Hi any body explain me...
    How to use Two main windows with in a page in script ?
    with  header data in one main window,
    & Item data in other main window.

    HI..,
    u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
    Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
    Here is the procedure !!
    -->Create a page window and assign it to a page.
    Choose <b>Edit --> Main windows</b>.
    A dialog box appears.
    -->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
    -->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
    Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
    -->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
    <b>
    Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
    In label printing, the field Upper margin also varies from main window to main window:
    <b>
      Upper margin of current main window +  Window height + Vertical spacing = Upper margin of next main window</b>
    -->Enter a value in the field Start position.
    This is a counter. Enter a starting value which is equal to or greater than 1.
    -->The main windows are added to the list.
    -->Save your form.
    reward if it helps u...
    sai ramesh

Maybe you are looking for