Salut
Mes table sont :
Identication_prestataire : (id_prestataire, nom, prénom, adresse, tel, fax, n_compte,rip, rib)
Listes: (num_list, design_list,qte,prix_u,tôt_prix)
Mon problème est que quand je voudrais afficher une facture d'un tel fournisseur voici le résultat :
Les chanps de la table identication_prestataire s'affichent toutes mais la deuxieme table ne s'affiche que la première ligne de liste
Note : les chapms de la table listes est constituer de Jlist
Par example si un fournisseur passe plusieurs commande il m'afiche que la première commande
Je vous remercier de votre aide
1 private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
2 String path = "C:\\Users\\Riad\\Documents\\NetBeansProjects\\Bon_Commande\\Anis.jrxml";
3 try {
4 JasperDesign inst_JasperDesign = (JasperDesign) JRXmlLoader.load(path);
7 int row = jTable1.getSelectedRow();
8 String Table_click = (jTable1.getModel().getValueAt(row, 0).toString());
9 String query = "select * from identification_prestataire,listes where id_prestataire '" + Table_click + "' " and id_prestataire = idFroeign;
10 JRDesignQuery newQuery = new JRDesignQuery();
11 newQuery.setText(query);
12 inst_JasperDesign.setQuery(newQuery);
13 JasperReport inst_JasperReport = JasperCompileManager.compileReport(inst_JasperDesign);
14 JasperPrint inst_JasperPrint = JasperFillManager.fillReport(inst_JasperReport, null, inst_Connection);
15 JasperViewer inst_JasperViewer = new JasperViewer(inst_JasperPrint);
16 inst_JasperViewer.setVisible(true);
17 inst_JasperViewer.setTitle(path);
18 inst_Connection.close();
19 } catch (Exception e) {
20 }
21 }
Partager