building a user interface using crystal reports. come unapplicazione comunica con lutente? problema...
TRANSCRIPT
![Page 1: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/1.jpg)
BUILDING A USER INTERFACEUsing CRYSTAL REPORTS
![Page 2: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/2.jpg)
COME UN’APPLICAZIONE COMUNICA CON L’UTENTE?• Problema comune a tutte le applicazioni informatiche• Forse meglio prima chiedersi…..
• COSA COMUNICA?
• I DATI
![Page 3: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/3.jpg)
TIPOLOGIE DI DATO COMUNICATO
• INPUT/OUTPUT• Configurazioni – CRUD
• OUTPUT• Analisi dati• Log Tecnici• Monitoraggio
![Page 4: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/4.jpg)
QUALI CARATTERISTICHE?• EFFICACE
• Mostrare tutti i dati che servono
• CONCISA• Solo quel che serve
• CHIARA• Si deve capire cosa sto facendo (tooltip, icone)
• RESPONSIVA• Non far aspettare l’utente (meglio una progress che una clessidra)
• FAMILIARE• Usare quel che l’utente si aspetta (uno slider e non una combo per un
controllo volume
• ACCATTIVANTE• Esteticamente gradevole
• FORGIVING• Gestione degli errori chiara (NO «errore di runtime 112321»)
![Page 5: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/5.jpg)
INTERFACCE DI CONFIGURAZIONE
• EDIT IN GRIGLIA
• PRO: MOLTO CONCISA• CONTRO: DIFFICILE DA PROGRAMMARE E SPESSO DA
USARE
![Page 6: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/6.jpg)
INTERFACCE DI CONFIGURAZIONE
• EDIT SU LISTA
• PRO: Più facile da programmare: la lista è in lettura• CONTRO: più lungo l’input per l’utente
![Page 7: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/7.jpg)
INTERFACCIA DI CONTROLLO• Pannello di controllo
• PRO: molto immediata• CONTRO: poco scalabile (non posso mostrare troppi dati)
![Page 8: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/8.jpg)
INTERFACCIA REPORT• PRO: posso mostrare
molti dati in varie forme(grafici+testo), scalabile, drillabile, stampabile, integrabile
• CONTRO: sola lettura, più complessa da realizzare
![Page 9: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/9.jpg)
CRYSTAL REPORTS• Tool di reportistica • Si connette direttamente a DB• Permette di creare report anche piuttosto complessi• È una delle soluzioni sul mercato, ma è quella che ha
avuto più diffusione• Può essere richiamato da c# e integrato in applicazioni c#• Alcuni elementi sono controintuitivi
![Page 10: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/10.jpg)
PASSAGGI PER CREARE UN REPORT
• IMPOSTARE L’ORIGINE DATI• Selezionare le tabelle/viste da usare• Organizzare il diagramma relazionale• Creare il report
• Scegliere i campi da mostrare• Organizzare le sezioni• L’eventuale raggruppamento• Aggiungere i grafici
![Page 11: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/11.jpg)
IMPOSTARE LA CONNESSIONE• USARE OLEDB(ADO) con driver SQL server native client
![Page 12: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/12.jpg)
• Posso attaccarmi anche a una vista o a store (anche parametriche!)
Selezionare le tabelle
![Page 13: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/13.jpg)
Organizzare il diagramma relazionale
![Page 14: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/14.jpg)
Selezionare i campi
![Page 15: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/15.jpg)
Il wizard…• Modo veloce per ottenere qualcosa• Spesso il risultato lascia a desiderare….
![Page 16: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/16.jpg)
ESERCITAZIONE• Creiamo un report vuoto• Connettiamoci al nostro DB• Usiamo il wizard per ottenere un primo report
![Page 17: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/17.jpg)
Due modalità di visualizzazione• STRUTTURA• ANTEPRIMA
![Page 18: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/18.jpg)
STRUTTURA DI UN REPORT• Sezioni
• Gruppi
• Dettaglio
• Sono sezioni pensate per la stampa!
![Page 19: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/19.jpg)
Aggiunta di campi al report• Drag and drop da treeview a destra
• Il risultato cambia a seconda della sezione
![Page 20: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/20.jpg)
Gli «esperti»• Esperto Sezione• Esperto Gruppo• Esperto Ordinamento• Esperto Modello
![Page 21: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/21.jpg)
Formato Campo• Varie opzioni di formattazione
![Page 22: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/22.jpg)
USO DI FORMULE• Utili per creare campi derivati • Disponibili funzioni condizionali• Disponibili operatori vari e funzioni
![Page 23: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/23.jpg)
CAMPI SPECIALI• Numero pagina• Utente che lancia il report• Pagine totali• ecc
![Page 24: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/24.jpg)
ALCUNE CONSIDERAZIONI FINALI• Spesso è conveniente creare un’unica vista o tabella (o
anche Stored proc) a origine dei dati • Non commettere l’errore di mettere la logica di
funzionamento un po’ nel report e un po’ nel db
![Page 25: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse](https://reader036.vdocuments.us/reader036/viewer/2022062701/5542eb5c497959361e8c9db8/html5/thumbnails/25.jpg)
ESERCITAZIONE• Creiamo un report che ci mostri il totale energia prodotta
diviso per impianto e mese • Un grafico opportuno che mostri la percentuale di energia
prodotta dai vari pannelli in relazione al totale• Come sopra in relazione al mese• Discutere le scelte fatte