Jusqu'à présent, je t'ai fais prendre en main les outils nécessaires.
Maintenant, tu dois développer les fonctionnalités de ton application
(voir cahier des charges)
Version imprimable
Jusqu'à présent, je t'ai fais prendre en main les outils nécessaires.
Maintenant, tu dois développer les fonctionnalités de ton application
(voir cahier des charges)
voici les nouvelles precisions apportees au projet:
Citation:
I . TYPE EQUIPEMENT
- Primaire
o Transformateur
o TGBT
o Groupe Electrogene Fixe
o Groupe Electrogene Rural
- Secondaire
o Redresseur 48v
o Batterie 48v
o Onduleur AC / AC
o Onduleur DC / AC
- Environnement
o Clim split système
o Clim armoire confort
o Clim armoire précision
o VMC ( ventilation mécanique contrôlée )
II . PRECISION EQUIPEMENT CONCERNE PAR CALCUL Taux Utilisation ( Charge actuelle / charge nominale )
- Transformateur
- Groupe Electrogene fixe
- Groupe Electrogene Rural
- Redresseur 48v
- Batterie 48v
- Onduleur AC / AC
- Onduleur DC / AC
III. PRECISION SUR PERIODICITE MAINTENANCE EQUIPEMENT
Seuls les groupes fixes sont horaires ; le reste est calendaire
IV. PRECISION SUR UTILISATEURS
- Service Maintenance ( administrateur général )
o Accès administrateur
o Accès login Primaire & Secondaire
o Accès Login Environnement
- 8 CI régions ( Dakar, TNP, Thies, St Louis ; Klk, Tamba ; Matam ; Zig )
o Gere leurs équipements ( alimentation base de donnée NRJ ; mis a jour données NRJ et niveau d’utilisation; maintenance interne et externe ) selon leur zone
Je cherchais fort longtemps un moyen d'utiliser le .jasper au lieu du .jrxml
J'ai essayé donc de mettre en application la solution de Népomucène mais je rencontre quelques erreurs.
voici comment je procède.
-> D'abord j'ai crée une desktopapplication avec netbeans 6.9.1
-> dans la fenêtre principale j'ai placé un bouton
-> j'ai ensuite appelé la méthode testImpression() dans le actionperformed du bouton
voici le contenu de la methode testImpression que j'ai placé dans la même classe que mon boutonCode:
1
2
3
4 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: testImpression(); }
j'obtiens l'erreur suivanteCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 public void testImpression() { try { // exemple de sortie au format PDF du rapport "interventions" au format PDF pour l'équipement N°123 String url = "jdbc:postgresql://localhost:5432/REC"; //public static String url = "jdbc:postgresql://192.168.1.2:5432/REC"; /* Nom du user */ String user = "postgres"; /*Mot de passe du user*/ String passwd = "postgres"; Connection conn = DriverManager.getConnection(url, user, passwd); // la connexion à la base de données //Map<String, Object> params = new HashMap<String, Object>(); //params.put("id_equipement", 123); new ImprJasper("test", conn, "PDF", null, "kika.pdf"); } catch (SQLException ex) { JOptionPane.showMessageDialog(null, ex); //Logger.getLogger(ImprJasper.class.getName()).log(Level.SEVERE, null, ex); } }
Des suggestions?:calim2:Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at net.sf.jasperreports.engine.util.JRLoader.<clinit>(JRLoader.java:65) at testprint.rapports.ImprJasper.<init>(ImprJasper.java:53) at testprint.TESTPRINTView.testImpression(TESTPRINTView.java:223) at testprint.TESTPRINTView.jButton1ActionPerformed(TESTPRINTView.java:231) at testprint.TESTPRINTView.access$800(TESTPRINTView.java:27) at testprint.TESTPRINTView$4.actionPerformed(TESTPRINTView.java:128) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 31 more
C'est un autre problème : Jasper attend la classe org/apache/commons/logging/LogFactory
Je suis un peu étonné que ça plante car moi je ne l'utilise pas et j'ai juste un Warning et c'est tout.
Quelle version de Jasper utilises-tu ?
slt les gars! j'ai aussi le même problème et je n'est pas pu résoudre. si quelqu'un peut m'apporter son aide...merci!
slt Rolls! tu avais dis que t'as pu résoudre en ajouter des bibliothèques. en fait, je suis débutant et j'ai aussi le même problème donc si tu peux me dire quelles bibliothèque tu as ajouter peut être que ça m'aiderais...merci!
Il nous faut les messages d'erreur ...