[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 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: 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 • Relatorio com dados de diversas tabelas
Página 1 de 1

Relatorio com dados de diversas tabelas

Enviado: Junho 13th, 2012, 12:21 pm
por Marcelo
Como montar um relatorio no xmaker com dados a partir de diversas tabelas conforme a seguir:
1o.) Listar os registros da tabela Lancamentos (diversas páginas);
2o.) Apos listar os registros da tabela Lancamentos, deve saltar para proxima página e listar os registros da tabela Contas com o saldo de cada conta cadastrada no sistema;
3o.) Ao final deve listar o registro da terceira tabela "Caixa", com os dados da conta caixa (da empresa cfme :Sistema_NumeroUsr).

Não sei como obter os dados de cada tabela sendo que ao criar o relatório tem que definir a tabela principal e o maker/free report traz apenas os dados da principal e as relacionadas.

Obs: Não quero montar um relatorio mestre/detalhe.

Obrigado.
Marcelo J. Gonçalves

Re: Relatorio com dados de diversas tabelas

Enviado: Setembro 28th, 2012, 3:18 pm
por vinizioWOW
Você pode criar várias páginas dentro do editor do FreeReport (bastar ir em Editar/Inserir nova página).

Com relação ás tabelas você 3 opções:

1 - Criar um relacionamento "Exclusão em cascata" entre as tabelas, assim você consegue selecionar todas elas no mesmo relatório dentro do Xmaker.

2 - Usar um componente de terceiros como o Rave, FastReports, QuickReport, etc... Você pode conectar os datasets desses relatórios ás tabelas do Xmaker. Como a conexão é feita em tempo de execução, você não vai ter a praticidade de arrastar os campos para dentro do relatório e montar.

3 - Ainda fazendo pelo método manual mas usando o FreeReport pelo Delphi inserindo mais frDataSets no formulário do relatório e relacionar com alguma tabela do projeto, para isso, tem que informar uma classe privada do tipo TDSuaTabela, instanciá-la no show do formulário e relacionar o seu frDataSet á tabela que você criou...

Exemplo:
//////////////declarando as classes....
private
{ Private declarations }
QyRelatorio: TTabela;
DClientes : TDClientes;
DContas : TDContas;
{02-Início do Bloco Modular. Modificações não serão preservadas}
...

/////////////instanciando-as no Onshow do Form...
procedure TFormSeuRelatorio.FormShow(Sender: TObject);
Var
I: Integer;
begin
DClientes := TDClientes.Create(Self);
DContas := TDContas.Create(Self);
...

////////////////depois faça seu filtro na procedure constroisql, associe sua tabela ao dataset do relatório...
procedure TFormSeuRelatorio.ConstroiSql;
var
I: Integer;
begin
DClientes.ChaveIndice := 'clientes.codigo';
DClientes.Filtro.Clear;
DClientes.Filtro.Add('(clientes.codigomunicipio = :XNumEdit1)');
DClientes.AtualizaSql(False);
Parametros(DClientes);
DClientes.Open;
frDataSet.DataSet := DClientes;

Dessa forma é mais difícil, porém te livra de ter que criar relacionamentos para poder montar o relatório.