Welcome to Emakin Q&A, where you can ask questions and receive answers from other members of the community.

Categories

0 votes
56 views
Formu print ederken form üzerinde belirli bir alanı çıkartmak veya yeni bir alan eklemek istiyorum. Print formu düzenlemesini nasıl yapabilirim?
by Boba Fett (460 points)
edited by

1 Answer

0 votes
Tasarım ekranında ilgili formun bulunduğu havuzunun (pool) altında Şablonlar (Templates) butonundan açılan sayfada farklı yazdırma şablonlarını xslt olarak ekleyebilirsiniz. Burada eklenen şablonlar bu havuzun tüm görevlerinde yazdır ikonuna basıldığında listelenecektir.

örnek içerik:

<Content><![CDATA[<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns1="http://schemas.emakin.com/forms"  version="1.0">
      <xsl:output method="html"></xsl:output>
      <xsl:decimal-format name="tr" decimal-separator="," grouping-separator="."></xsl:decimal-format>
      <xsl:template match="GroupTransferForm">
       <style>
            .header {
                font-weight: bold; text-align:center;
                font-size: 2em;
            }
            
            table.banknote {background-color:transparent;border-collapse:collapse;width:100%;}
            table.banknote th, table.banknote td {text-align:center;border:1px solid black;padding:5px;}
            table.banknote th {background-color:AntiqueWhite;}
            table.banknote th:first-child {width:20%;}
            
        </style>
        
        <p class="header">test</p>
        <xsl:for-each select="//Banknotes/Banknote">
            <table class="banknote">
                <tr>
                    <th rowspan="100">
                        <xsl:value-of select="Currency"></xsl:value-of>
                    </th>
                    <th>Küpür</th>
                    <th>Adet</th>
                    <th>Tutar</th>
                </tr>
                <xsl:for-each select="Detail/Row">
                 <tr>
                    <td>
                       <xsl:value-of select="Clipping"></xsl:value-of>
                     </td>
                     <td>
                       <xsl:value-of select="format-number(Count,'#.###','tr')"></xsl:value-of>
                     </td>
                     <td>
                       <xsl:value-of select="format-number(Amount,'#.###','tr')"></xsl:value-of>
                     </td>             
                 </tr>
                </xsl:for-each>
                <tr>
                    <th>TOPLAM:</th>
                    <th colspan="2" align="right">
                        <div style="float:right;width:50%;"><xsl:value-of select="concat(sum(Detail/Row/Amount),' ' , Currency)"></xsl:value-of></div>
                     </th>             
                 </tr>
                 <br/>
                <br/>
             </table>
        </xsl:for-each>
        <br/>
        
    </xsl:template>    
    <xsl:template match="DeliveryDate">
       <xsl:if test=".!=''">
        <span>
          <xsl:value-of select="substring(.,9,2)"></xsl:value-of>
.         <xsl:value-of select="substring(.,6,2)"></xsl:value-of>
.         <xsl:value-of select="substring(.,1,4)"></xsl:value-of>
        </span>
       </xsl:if>
     </xsl:template>
</xsl:stylesheet>]]></Content>

İkinci olarak formun içine XslTransform kontrolüde ekleyebilirsiniz

  <XslTransform XPath="">
        <TargetXPath/>
        <Xsl>

<xsl:stylesheet
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> ...

...</xsl:stylesheet>
        </Xsl>
    </XslTransform>
by Han Solo (1.7k points)
XSLT yerine basit şablonları da http://wiki.emakin.com/display/EMK/Data+Templates kullanabilirsiniz. XSLT'ye göre kullanımı daha kolay olacaktır.
...