DEV Community

Fazlı Akça
Fazlı Akça

Posted on

Printing Multiple Design With Single Button

<control FieldName="PrintPDF" ControlType="Button" CaptionVisible="True" ToolTip="Kantar Fişi Yazdır" Caption="Yazdır" Width="25" Height="25" 
         CustomAttribute="onmouseover=BiggerImage(this, event, 'Kimlik Bilgileri')" 
         ServerAttribute="Image-Url=https://gallery.mailchimp.com/754a5064cb12ce106fca9e2c7/images/d5269d56-0049-4421-91f2-67d5886edfe7.png">
    <ClientSideEvents Click="function(s, e) {
            var recordId = GetControlValue('Id');
            var isyeri = GetControlValue('BranchCode');

            var prmKeys = ['CurrentIdentity', 'Id'];
            var prmValues = ['12345', recordId];

            var grupA = ['1101', '1002'];
            var grupB = ['1115', '1110'];

            if (grupA.includes(isyeri)) {
                OpenReportPDF('11001117', prmKeys, prmValues);
            } else if (grupB.includes(isyeri)) {
                OpenReportPDF('11001118', prmKeys, prmValues);
            } else {
                OpenReportPDF('11001117', prmKeys, prmValues);
            }
        }"/>
</control>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)