Hi Henri

Thanks Henri for your interest. Create a menu button that goes directly to the object of the report, but in some reports I need a selection list like: print All, Active, Inactive. I have a report object where I send several reports because they are similar, and in the filter I make a CASE BEGIN .... END CASE, where I set the filters for each one, the parameters are the same. In summary, I do not want to create a view for every report. I want to use a DemoActionDialog to request the selection in some ("T: All | V: current | C: Canceled"), how to use it in this scenario? Am I using the thorniest way? I see that DemoActionDialog works fine on a button.


Code:
   Procedure OnItemClick String sId String sCaption 
                    Integer iDestino 
                    String sFormato
                    Integer iEstado 
                    Get piEstado to iEstado
                    
                      
                    If (sId="1.1")  Move  "PlanPagos.DR" to sformato
                    If (sId="1.2")  Move  "PlanPagosFsc.DR" to sformato
                    If (sId="1.3")  Move  "Escuenta.DR" to sformato
                    If (sId="1.4")  Move  "Esctadet.DR" to sformato
                    If (sId="1.5")  Move  "CCABONOS.DR" to sformato
                    If (sId="1.6")  Move  "CCDistri.DR" to sformato  
                    //........      
                    If (sId="2.1")  Move  "Clientes.DR"   to sformato
                    If (sId="2.2")  Move  "Ccedades.DR"    to sformato     
                    If (sId="2.3")  Move  "Cxcalifica.DR" to sformato
                    If (sId="2.4")  Move  "Ccestcta.DR" to sformato
                    If (sId="2.5")  Move  "Estracto.DR" to sformato
                    If (sId="2.6")  Move  "CcFctura.DR" to sformato
                    If (sId="2.7")  Move  "CcFacdetal.DR" to sformato
                    If (sId="2.8")  Move  "CcFacont.DR" to sformato
                    If (sId="2.9")  Move  "ccausado.DR" to sformato
                    If (sId="2.10") Move  "ConCartera.DR" to sformato
                    If (sId="2.11") Move  "CXPAGAR.DR" to sformato    
                       
                                                
                    Send RunReporteDO of oWebPanelDO sId  sFormato
                
  End_Procedure  


 Procedure RunReporteDO String  sId String sFormato 
                String sTexto
                
                Case Begin
                   Case (pos(sId,"2.5"))
                        Send RunReport      of oEstracto  
                        Send GenerateReport of oEstracto   
                        Break
                   Case (pos(sId,"1.1|1.2"))
                        Set psReportName of  oPlanPagos to sFormato
                        Send DRPlanPagos of  oPlanPagos sFormato  
                        Send GenerateReport of oPlanPagos
                        Break
                   Case (Pos(sId,"1.3|1.4|1.5|1.6"))
                         Set psReportName    of oRepPanelDO to (Trim(SFormato))  
                         Send RunReport      of oRepPanelDO    
                         Send GenerateReport of oRepPanelDO
                         Break 
                   Case (Pos(sId,"2.1|2.2|2.3|2.4|2.6|2.7|2.8|2.9|2.10|2.11")) 
                        Set psReportName    of oRepPanelDO to (Trim(SFormato))  
                        Send RunReport      of oRepPanelDO    
                        Send GenerateReport of oRepPanelDO
                   Break  
                Case End
                
 End_Procedure 



  
  Procedure SetFilters  
                       String sReportId  sFormato
                        Integer iEstado     
                        Date dFecha
                       
                       Get psReportName to sFormato 
                       Get psReportId to sReportId   
                
                 Case Begin         
                      Case (pos(Uppercase(sFormato),"CONCARTERA.DR")) 
                           Send AddFilter sReportId "{cxcmayor.Empresa}" C_drEqual gsEmpresa
                           Send AddFilter sReportId "{Conmayor.Empresa}" C_drEqual gsEmpresa
                           Send AddFilter sReportId "{cxcfactu.Empresa}" C_drEqual gsEmpresa
                           Send AddFilter sReportId "{Cxcfactu.KtalSaldo}" C_drGreaterThan 0
                           Case Break
                     Case (pos(Uppercase(sFormato),"CCAUSADO.DR")) 
                            Send AddFilter sReportId "{cxcmayor.Empresa}" C_drEqual gsEmpresa
                            Send AddFilter sReportId "{Ccacumul.Empresa}" C_drEqual gsEmpresa
                            Send AddFilter sReportId "{Ccacumul.Anno}" C_drGreaterThanOrEqual (giAnoTarea-1)
                           Case Break
                    Case (Uppercase(sFormato)="CCFACONT.DR")
                           Send AddFilter sReportId "{cxcmayor.Empresa}" C_drEqual gsEmpresa
                           Send AddFilter sReportId "{conmayor.Empresa}" C_drEqual gsEmpresa
                           Send AddFilter sReportId "{Cxcfactu.Empresa}" C_drEqual gsEmpresa
                          Case Break
   End_procedure
Edgar