Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Impresión (https://www.clubdelphi.com/foros/forumdisplay.php?f=4)
-   -   como poner invisible un masterdata cuando va imprimir? (https://www.clubdelphi.com/foros/showthread.php?t=70936)

ingcarolinae 20-11-2010 00:29:45

como poner invisible un masterdata cuando va imprimir?
 
Buenos Noches.:p

estoy haciendo un informe que en ciertos meses el masterdata no tiene datos por consiguiente sale vació.

y necesito que si ese masterdata esta vació se pongan en un footer en visible:=false;

en el procedimiento beforeprint en código delphi,
procedure TDmRptAdenunapagina.frxReporteMaestroBeforePrint(
Sender: TfrxReportComponent);
begin
inherited;
if Dataset = nil then begin
TfrxFooter(frxreportemaestro.FindComponent('footer2')).visible:= false;
end;
end;
no funciona
y si utilizo
if frxreportemaestro.FindComponent('masterdata3') = nil then begin
TfrxFooter(frxreportemaestro.FindComponent('footer2')).visible:= false;
end;
end;

tampoco.

como puedo hacer el if ?

Muchas Gracias por la ayuda.:p

Al González 20-11-2010 07:42:21

Hola ingcarolinae.

Hay muchos componentes para generación de reportes, ¿cuáles estás utilizando? Te invito a detallar el problema de la forma más clara que puedas, para que logremos comprender la situación y quizá ofrecer alguna solución.

También conviene que uses la etiqueta "Resaltar sintaxis Delphi", para que el código que desees mostrarnos aquí no pierda sangrado y legibilidad. :)

Cita:

Empezado por ingcarolinae (Mensaje 382829)
Código Delphi [-]
procedure TDmRptAdenunapagina.frxReporteMaestroBeforePrint(
 Sender: TfrxReportComponent);
begin
 inherited;
 if Dataset = nil  then begin
TfrxFooter(frxreportemaestro.FindComponent('footer2')).visible:= false;
  end;
end;
no funciona

y si utilizo
Código Delphi [-]
if frxreportemaestro.FindComponent('masterdata3') = nil then begin
TfrxFooter(frxreportemaestro.FindComponent('footer2')).visible:= false;
   end;
end;
tampoco.

Y si aparece un mensaje de error al compilar o ejecutar tu aplicación, también es útil que nos lo transcribas para indagar en las posibles causas.

Un saludo. :)


La franja horaria es GMT +2. Ahora son las 19:59:41.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi