[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 594: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 650: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1110: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5277: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
Fórum Xmaker • Month Calender
Página 1 de 1

Month Calender

Enviado: Julho 29th, 2011, 1:30 pm
por Adilson
Tenho um tela contendo um campo nome texto e 1 month calender e 1 dbgrid.
Gostaria de ao clicar na data do month calender , preencher a grid com os registro iguais a data escolhida no month.
Fiz conforme abaixo, alguem poderias informar onde esta errado, pois a minha grid fica vazia e não vem os valores devidos.

procedure TFormAgm.MonthCalendar1Click(Sender: TObject);

{utilize o "var" para declarar variáveis}

begin
{codificação...}
TabGlobal.DAgenda_Medica_Itens.close;
TabGlobal.DAgenda_Medica_Itens.filtro.clear;
TabGlobal.DAgenda_Medica_Itens.Filtro.add('WHERE Medi_Data=:1');
TabGlobal.DAgenda_Medica_Itens.Filtered:= True;
TabGlobal.DAgenda_Medica_Itens.params[0].asdate:=monthcalendar1.date;
TabGlobal.DAgenda_Medica_Itens.open;
end;

Agradeço


Adilson

Re: Month Calender

Enviado: Julho 29th, 2011, 2:58 pm
por Gustavo

Re: Month Calender (Resolvido)

Enviado: Julho 29th, 2011, 4:27 pm
por Adilson
Gustavo,

Boa Tarde,

Agradeço a informação, esta resolvido o meu problema.

Ficou conforme abaixo :

Att.


Adilson
-------------------------------------------------------------------------------------------------------
var
Oper, Delimit_E,Delimit_D: String;
FormatoData: string;
CmpF: TAtributo;
Data: TDateTime;
I: Integer;
mov: TTabela;
juncao:string;
begin
mov:=TabGlobal.DAgenda_Medica_Itens;//tabelaprincipal;
Oper := '=';
Delimit_E := #39+'';
Delimit_D := #39;

mov.Filtro.Clear;

{ tratameno Descrição filtro }
if trim(datetoStr(MonthCalendar1.date))='/ /' then
exit;
if not(datetostr(MonthCalendar1.date)='') THEN
begin
mov.Filtro.text:='Agenda_Medica_Itens.Medi_data ='+Delimit_E+datasql(monthCalendar1.date)+ Delimit_D ;
juncao:=' AND ';
end
else juncao:='';
{ fim tratamento Descrição }

mov.AtualizaSql;
mov.Refresh;

end;