[RESOLVIDO] É possível criar Grid ou Table no IReport ?  XML
Índice dos Fóruns » Ferramentas, Frameworks e Utilitários
Autor Mensagem
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Queria saber se é possível criar Grid`s ou Table no IReport, se possível queria um Exemplo prático, estou com dificuldades em encontrar.


Quem puder ajudar desde já agradeço.

This message was edited 2 times. Last update was at 23/06/2009 13:07:04


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

furutani
JWizard
[Avatar]

Membro desde: 11/10/2003 23:58:51
Mensagens: 2995
Localização: Iacri-SP e São Paulo-SP
Offline

Você pode fazer um relatório em forma tabular sem problema nenhum.

Até mais,
Roberto Jundi Furutani


Sun Certified Business Component Developer 1.3
Sun Certified Web Component Developer
Sun Certified Java Programmer
SAP Certified Development Associate - ABAP with SAP NetWeaver 7.0

[WWW]
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Você conhece algum tutorial para seguir, teria algum exemplo apenas para iniciar ?

"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

furutani
JWizard
[Avatar]

Membro desde: 11/10/2003 23:58:51
Mensagens: 2995
Localização: Iacri-SP e São Paulo-SP
Offline

Aqui nesse site http://www.furutani.com.br/tag/ireport/ eu tenho alguns tutoriais.
Espero que te ajude.

Até mais,
Roberto Jundi Furutani


Sun Certified Business Component Developer 1.3
Sun Certified Web Component Developer
Sun Certified Java Programmer
SAP Certified Development Associate - ABAP with SAP NetWeaver 7.0

[WWW]
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Ajudou , muito obrigado !

"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

Paezani
JavaTeenager
[Avatar]

Membro desde: 29/04/2009 13:10:24
Mensagens: 166
Offline

Bom galera estou tentando acessar este link para ver como se faz e não estou conseguindo... estou precisando criar uma tabela também.
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

No começo também tive problemas, mas de qualquer forma tente acessar esse aqui :

Tutorial JasperReports - IReports

"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

Paezani
JavaTeenager
[Avatar]

Membro desde: 29/04/2009 13:10:24
Mensagens: 166
Offline

Bom colegas será que isso seria uma solução para o meu problema?
O meu problema está neste tópico:

http://www.guj.com.br/posts/list/131145.java

Fico no aguardo, abraço e brigado pela atenção
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Paezani wrote:Bom colegas será que isso seria uma solução para o meu problema?
O meu problema está neste tópico:

http://www.guj.com.br/posts/list/131145.java

Fico no aguardo, abraço e brigado pela atenção



Não sei isso resolveria seu problema pelo que vi, mas eu tentaria dessa forma, usei SubReport e funcionou perfeitamente, meu ralatório possui campos estatícos e uma tabela dentro de um Form, solucionei todos os meu problemas assim, se tiver alguma dúvida é só postar que eu respondo, se quiser deixo aqui um arquivo de teste para você com código

This message was edited 1 time. Last update was at 08/07/2009 14:59:38


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

Paezani
JavaTeenager
[Avatar]

Membro desde: 29/04/2009 13:10:24
Mensagens: 166
Offline

Então mas o problema está no detail que é preenchido de acordo com os dados de uma tabela do banco de dados que pode variar de acordo com o funcionário, um pode ter 5, outro 10...e queria ter um tamanho fixo independente do número de registros...
Se puder deixar um arquivo de teste seria talvez de melhor entendimento...

abraço
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Paezani wrote:Então mas o problema está no detail que é preenchido de acordo com os dados de uma tabela do banco de dados que pode variar de acordo com o funcionário, um pode ter 5, outro 10...e queria ter um tamanho fixo independente do número de registros...
Se puder deixar um arquivo de teste seria talvez de melhor entendimento...

abraço



Eu não sei bem como você trabalha com os dados, mas vamos partir do ponto de que seus dados vêm de uma pesquisa, claro que a uma tabela no banco, logo você poderia simplesmente limitar a origem dos seus dados com um "limit" (MySql) ou um "Rownum" (Oracle).

Caso sua fonte de dados estaja em uma coleção qualquer, você poderia percorrer 5 registros dessa coleção inserindo em outra coleção a qual o Jasper recebe os dados.

Eu partiria desse princípio, se não é possível trabalhar no Jasper, limitaria isso na fonte.


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

Paezani
JavaTeenager
[Avatar]

Membro desde: 29/04/2009 13:10:24
Mensagens: 166
Offline

Bom, estou usando o MySql, mas acho que o limit não seria útil pois, limitaria o número de registros... Mas o que quero, é que se tenho 7 ou 5 ou 3 registros neste recibo, tenha 10 linhas por exemplo, na banda detail.
Pensei em incluir registros em branco para completar o numero de registros no banco, mas ocuparia espaço...sem dados ...se tivesse 7 itens, incluiria 3 em branco....
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Ao invés de criar os registros em branco no banco, não seria possível criar uma função simples, do tipo,



A função simplesmente iria completar a "List" que carrega os valores para o Jasper


"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

Paezani
JavaTeenager
[Avatar]

Membro desde: 29/04/2009 13:10:24
Mensagens: 166
Offline

Bom Metaleiro, eu faço a consulta na query no Ireport...Usando o:


Eu não teria que fazer a consulta na classe java? Eu nunca usei desta maneira.... Se quiser eu posto a classe que gera o relatório...
Obrigado pela paciência e atenção
Metaleiro
Virtual Machine Man
[Avatar]

Membro desde: 06/07/2006 10:55:54
Mensagens: 668
Localização: São Bernardo do Campo - SP
Offline

Sim você poderia fazer em uma classe ou simplemente criar um método para usar como postei.

"Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you're fighting for something? For more than your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can?t win. It?s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?"

Neo :
-Because is my choice

 
Índice dos Fóruns » Ferramentas, Frameworks e Utilitários
Ir para:   
Powered by JForum 2.1.8 © JForum Team