Skip to main content

Hi

I have a quick report like that

but I can not entry more then 1 value on 

and ifsapp.report_sys.Parse_Parameter(p.accounting_group,'&mg')='TRUE'

part, can someone help me

SELECT i.CONTRACT,
       i.YEAR,
       i.period,
       i.PART_NO,
       p.description,
       p.unit_meas,
       p.accounting_group,
       accounting_group_api.Get_Description(p.accounting_group) acc_group_tanim,
       p.part_product_code asset_class,
       sum(i.db_devir_tutar)              db_devir_tutar,
       SUM(i.satinalma_giris_tutar)       satinalma_giris_tutar,
       SUM(i.satinalma_iadesi_tutar)      satinalma_iadesi_tutar,
       SUM(i.uretimde_cikis_tutar)        uretimde_cikis_tutar,
       SUM(i.uretimden_giris_tutar)       uretimden_giris_tutar,
       SUM(i.satis_tutar)                 satis_tutar,
       SUM(i.satistan_iade_tutar)         satistan_iade_tutar,
       SUM(i.ic_kullanim_cikislari_tutar) ic_kullanim_cikislari_tutar,
       SUM(i.hurda_cikisi_tutar)          hurda_cikisi_tutar,
       SUM(i.fason_gonderim_tutar)        fason_gonderim_tutar, 
       SUM(i.diger_girisler_tutar)        diger_girisler_tutar,
       SUM(i.diger_cikislar_tutar)        diger_cikislar_tutar,
       SUM(i.sayim_girisi_tutar)          sayim_girisi_tutar,
       SUM(i.sayim_cikisi_tutar)          sayim_cikisi_tutar,
       sum(i.ds_tutar)                    ds_tutar,
       ---
       sum(i.db_devir_miktar)              db_devir_miktar,
       SUM(i.satinalma_giris_miktar)       satinalma_giris_miktar,
       SUM(i.satinalma_iadesi_miktar)      satinalma_iadesi_miktar,
       SUM(i.uretimde_cikis_miktar)        uretimde_cikis_miktar,
       SUM(i.uretimden_giris_miktar)       uretimden_giris_miktar,
       SUM(i.satis_miktar)                 satis_miktar,
       SUM(i.satistan_iade_miktar)         satistan_iade_miktar,
       SUM(i.ic_kullanim_cikislari_miktar) ic_kullanim_cikislari_miktar,
       SUM(i.hurda_cikisi_miktar)          hurda_cikisi_miktar,
       SUM(i.fason_gonderim_miktar)        fason_gonderim_miktar, 
       SUM(i.sayim_girisi_miktar)          sayim_girisi_miktar,
       SUM(i.sayim_cikisi_miktar)          sayim_cikisi_miktar,       
       SUM(i.diger_girisler_miktar)        diger_girisler_miktar,
       SUM(i.diger_cikislar_miktar)        diger_cikislar_miktar,
       sum(i.ds_miktar)                    ds_miktar
FROM ifsapp.trcost_invtrans_sum i,
ifsapp.inventory_part p,
ifsapp.site s
WHERE i.contract=s.contract
AND s.company IN ('--EMI','ERD')
/*AND (i.YEAR='2022' AND i.PERIOD>=10
     OR
     i.YEAR='2023' AND i.PERIOD<=9
     )    */
     
     AND (i.YEAR='&yil1' AND i.PERIOD>='&ay1'
     OR
     i.YEAR='&yil2' AND i.PERIOD<='&ay2'
     )             
AND i.contract=p.contract
and ifsapp.report_sys.Parse_Parameter(p.accounting_group,'&mg')='TRUE'

AND i.part_no=p.part_no
GROUP BY  YEAR,
          period,
          i.CONTRACT,
          i.PART_NO,
          p.description,
          p.accounting_group,
          p.unit_meas,
          p.part_product_code
--ORDER BY 1,7,8,2,3,4,5,6,7
union all

SELECT 
       i.CONTRACT,
       to_sayı(NULL) YEAR,
       to_sayı(NULL) period,
        to_char(NULL) part_no,
       to_char(NULL) description,
        to_char(NULL) unit_meas,      
     to_char(NULL) accounting_group,
    to_char(NULL) acc_group_tanim,
     to_char('DIP TOPLAM')asset_class,
       sum(i.db_devir_tutar)              db_devir_tutar,
       SUM(i.satinalma_giris_tutar)       satinalma_giris_tutar,
       SUM(i.satinalma_iadesi_tutar)      satinalma_iadesi_tutar,
       SUM(i.uretimde_cikis_tutar)        uretimde_cikis_tutar,
       SUM(i.uretimden_giris_tutar)       uretimden_giris_tutar,
       SUM(i.satis_tutar)                 satis_tutar,
       SUM(i.satistan_iade_tutar)         satistan_iade_tutar,
       SUM(i.ic_kullanim_cikislari_tutar) ic_kullanim_cikislari_tutar,
       SUM(i.hurda_cikisi_tutar)          hurda_cikisi_tutar,
       SUM(i.fason_gonderim_tutar)        fason_gonderim_tutar, 
       SUM(i.diger_girisler_tutar)        diger_girisler_tutar,
       SUM(i.diger_cikislar_tutar)        diger_cikislar_tutar,
       SUM(i.sayim_girisi_tutar)          sayim_girisi_tutar,
       SUM(i.sayim_cikisi_tutar)          sayim_cikisi_tutar,
       sum(i.ds_tutar)                    ds_tutar,
       ---
       sum(i.db_devir_miktar)              db_devir_miktar,
       SUM(i.satinalma_giris_miktar)       satinalma_giris_miktar,
       SUM(i.satinalma_iadesi_miktar)      satinalma_iadesi_miktar,
       SUM(i.uretimde_cikis_miktar)        uretimde_cikis_miktar,
       SUM(i.uretimden_giris_miktar)       uretimden_giris_miktar,
       SUM(i.satis_miktar)                 satis_miktar,
       SUM(i.satistan_iade_miktar)         satistan_iade_miktar,
       SUM(i.ic_kullanim_cikislari_miktar) ic_kullanim_cikislari_miktar,
       SUM(i.hurda_cikisi_miktar)          hurda_cikisi_miktar,
       SUM(i.fason_gonderim_miktar)        fason_gonderim_miktar, 
       SUM(i.sayim_girisi_miktar)          sayim_girisi_miktar,
       SUM(i.sayim_cikisi_miktar)          sayim_cikisi_miktar,       
       SUM(i.diger_girisler_miktar)        diger_girisler_miktar,
       SUM(i.diger_cikislar_miktar)        diger_cikislar_miktar,
       sum(i.ds_miktar)                    ds_miktar
FROM ifsapp.trcost_invtrans_sum i,
ifsapp.inventory_part p,
ifsapp.site s
WHERE i.contract=s.contract

     AND (i.YEAR='&yil1' AND i.PERIOD>='&ay1'
     OR
     i.YEAR='&yil2' AND i.PERIOD<='&ay2'
     )   
         
AND i.contract=p.contract

and ifsapp.report_sys.Parse_Parameter(p.accounting_group,'&mg')='TRUE'


AND i.part_no=p.part_no
GROUP BY  
          i.CONTRACT
         
ORDER BY 1,7,8,2,3,4,5,6,7
 

Hi @atezcan 

 

Try like below. 

 

ifsapp.report_sys.Parse_Parameter(p.accounting_group,'&a-C--L]mg')='TRUE'


For further clarification as to why @hhy38 has the right solution, by default, quick report parameters use these flags s-CS-L]

M=Mandatory

C=Custom (simplified or 'values only')

S=Single flag

B=Allow Between expressions

L=Allow wildcards ('%' and '_')

The single flag only allows a single value. By changing to t-C --L] you’re allowing multiple values separated by ‘;’ e.g. ‘value1;value2;value3’

For more info, look at the “Development of Quick Reports” page in the technical documentation.

Development of Quick Reports (ifs.com)


@djsteiger 

Thank you. 

 

@atezcan 

You can also find more information about Quick Reports from my blog post below. 

 

https://hasanyucel.com/ifs-erp-gelismis-hizli-rapor-olusturma/


Reply