+ All Categories
Home > Documents > BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema...

BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema...

Date post: 02-May-2015
Category:
Upload: nunzia-sassi
View: 214 times
Download: 0 times
Share this document with a friend
25
BUILDING A USER INTERFACE Using CRYSTAL REPORTS
Transcript
Page 1: BUILDING A USER INTERFACE Using CRYSTAL REPORTS. COME UNAPPLICAZIONE COMUNICA CON LUTENTE? Problema comune a tutte le applicazioni informatiche Forse.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

• 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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


Recommended