Dois details num so relatorio quickreport
23/05/2008
0
Glower
Posts
24/05/2008
André Rodrigues
tenho um sistema feito em delphi 6, interbase e utilizo o quickreport. Tenho um relatorio onde aparece o nome do servidor junto com seus proventos e descontos, no meu caso eu utilizo um detail para mostrar o servidor e dois subdetails para mostrar os proventos e os descontos. Nao sei como esta a estrutura do seu banco e nem a ligacao entre as tabelas, se vc puder dizer como esta a estrutura e a ligacao entre as tabelas usadas para os cadastros q vc descreveu ajudaria a entender melhor seu problema. Mas de antemao me parece facil de se resolver, so preciso entender melhor como vc trata as informacoes a respeito de ordem de servico, servicos e componentes.
24/05/2008
Glower
tabela os
# Table structure for table ´tb_os´ CREATE TABLE /*!32312 IF NOT EXISTS*/ ´tb_os´ ( ´id´ int(10) NOT NULL auto_increment, ´data_abertura´ date default NULL, ´hora_abertura´ time default NULL, ´id_cliente´ int(5) default NULL, ´status´ varchar(30) default NULL, ´pagamento´ varchar(50) default NULL, ´id_vendedor´ int(5) default NULL, ´id_tecnico´ int(5) default NULL, ´id_objeto´ int(10) default NULL, ´tipo´ varchar(15) default NULL, ´problema´ varchar(255) default NULL, ´laudo´ varchar(255) default NULL, ´obs´ varchar(255) default NULL, ´flag´ varchar(1) default ´p´, ´flagrecebimento´ varchar(1) default ´p´, PRIMARY KEY (´id´) ) ENGINE=MyISAM AUTO_INCREMENT=69 /*!40100 DEFAULT CHARSET=latin1*/;
tabela do detalhe venda produtos
# Table structure for table ´tb_detalhe_venda_os´ CREATE TABLE /*!32312 IF NOT EXISTS*/ ´tb_detalhe_venda_os´ ( ´id´ int(10) NOT NULL auto_increment, ´id_os´ int(10) NOT NULL, ´id_produto´ int(10) NOT NULL, ´nome´ varchar(255) NOT NULL, ´descricao´ varchar(50) NOT NULL, ´quantidade´ int(5) NOT NULL, ´preco´ float(10,2) NOT NULL, ´total´ float(10,2) NOT NULL, PRIMARY KEY (´id´) ) ENGINE=MyISAM AUTO_INCREMENT=37 /*!40100 DEFAULT CHARSET=latin1*/;
tabela detalhe serviço
Table structure for table ´tb_detalhe_os´ CREATE TABLE /*!32312 IF NOT EXISTS*/ ´tb_detalhe_os´ ( ´id´ int(10) NOT NULL auto_increment, ´id_os´ int(10) NOT NULL, ´id_servico´ int(10) NOT NULL, ´nome´ varchar(255) NOT NULL, ´descricao´ varchar(50) NOT NULL, ´quantidade´ int(5) NOT NULL, ´preco´ float(10,2) NOT NULL, ´total´ float(10,2) NOT NULL, PRIMARY KEY (´id´) ) ENGINE=MyISAM AUTO_INCREMENT=47 /*!40100 DEFAULT CHARSET=latin1*/;
Desde ja agradesco a ajuda
25/05/2008
André Rodrigues
seguinte como nas duas tabelas o id_os eh comum vc pode fazer como eu faco, um detail para a ordem de servico e dois subdetails um para detalhe venda e outro para detalhe produtos.
Clique aqui para fazer login e interagir na Comunidade :)