Ver Mensaje Individual
  #1  
Antiguo 18-08-2008
Avatar de richy08
richy08 richy08 is offline
Miembro
 
Registrado: may 2007
Ubicación: Bucerias, Nayarit Mexico
Posts: 529
Reputación: 18
richy08 Va por buen camino
Crear Parametros dinamicamente en Crystal desde delphi

Buenos dias Compañeros tengo un pequeño problema cree un reporte el cual a veces necesito que filtre por tres campos y a veces por dos el detalle es como puede indicarle a crystal que cree en el reporte lso parametros la formula las borro y las vuelvo a genrar el problema es crear los parametros gracias por cualquioer ayuda.

Código Delphi [-]
  Crp_OcuRat.WindowState:=WsMaximized;
      Crp_OcuRat.Selection.Formula.Clear;
      if dbl_Age.KeyValue=Null then
      begin
         Crp_OcuRat.Selection.Formula.Add(' {reserve.sStaRes}=''PA'' and {reserve.dArrivaldate}>={?fecini} and {reserve.dArrivaldate}<={?fecend}');
         Crp_OcuRat.Paramfields[0].currentvalue:=FormatDateTime(' yyyy,mm,dd',Dtp_ArrDat.date);
         Crp_OcuRat.Paramfields[1].currentvalue:=FormatDateTime(' yyyy,mm,dd',dtp_deda.date);
      end
      else
      begin
         Crp_OcuRat.Selection.Formula.Add(' {reserve.sStaRes}=''PA'' and {reserve.dArrivaldate}>={?fecini} and {reserve.dArrivaldate}<={?fecend} and {sources.sSourceCode}={?agencie}');
         Crp_OcuRat.Paramfields[0].currentvalue:=FormatDateTime(' yyyy,mm,dd',Dtp_ArrDat.date);
         Crp_OcuRat.Paramfields[1].currentvalue:=FormatDateTime(' yyyy,mm,dd',dtp_deda.date);
         Crp_OcuRat.Paramfields[2].currentvalue:=dbl_age.KeyValue;
      end;
        Crp_OcuRat.Show;
Responder Con Cita