12 Mayıs 2016 Perşembe

JQuery Enter Key (Input alanda Enter basılması durumunda istenilen fonksiyonun Çalıştırılması)

 (function ($) {
        $.prototype.enterPressed = function (fn) {
            $(this).keyup(function (e) {
                if ((e.keyCode || e.which) == 13) {
                    fn();
                }
            });
        };
    }(jQuery || {}));

    $("input").enterPressed(function () {
        Sorgula();
    });

11 Mayıs 2016 Çarşamba

Automatically Converting Numbers stored as text to numbers when export excel in ireport


For excel to automatically detect what type of format the cell should be, add the following to your jrxml file at the top in the report properties section: 


<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>

To have excel show formula when highlighting a cell and do the calculation, in your jrxml file, format the field you want to have the SUM as follows: 

<textField>
<reportElement x= y= width= height= >
<propertyExpression name="net.sf.jasperreports.export.xls.formula"><![CDATA["=SUM()"]]> 
</propertyExpression>
</reportElement>
<textElement /> 
<textFieldExpression > <![CDATA[<whatever you want to display when in pdf or rtf format>]]></textFieldExpression>
</textField>