Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
Crystal Reports e reportistica
Collegamento a dataset
martedì 14 giugno 2005 - 12.16
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
stee85
Profilo
| Senior Member
299
messaggi | Data Invio:
mar 14 giu 2005 - 12:16
Ciao a tutti
dovrei collegare il mio crystalreportviewer al report passandogli un dataset.xsd come faccio?
ah sto lavorando con le windows form nel caso cambiasse qualche cosa
grazie mille
ste
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
mar 14 giu 2005 - 16:16
ciao,
io di solito facccio 1 dataset nel preogetto perche mi serve ch eil report capisca la struttura, poi creo l'oggetto dataset da codice e lo riempio etc.. ed infine setto il datasource all'oggetto report
Qualcosa del tipo:
Dataset miods = new Dataset();
...
ReportDocument mioreport = new ReportDocument ();
mioreport.load("....miofile
mioreport .SetDataSource (miods );
Nel design time ovviamente ho aggiunto 1 oggetto dataset che rispecchia quello che poi gli passero' da codice in modo che posso costruire il report. (ps puoi anche usare come fonte 1 file Xml in alternativa)
ciao
d3c0
Profilo
| Newbie
16
messaggi | Data Invio:
ven 19 mag 2006 - 10:59
Ciao a tutti,
sono un novizio in ambito crystal report e .net 2005, è qualche giorno che "smanetto" con i report e giustamente mi sono incagliato !
Ho un form dove ho inserito un CrystalReportViewer1 e ho creato un file .rpt associato al viuwer (lo visualizzo nella barra degli oggetti inseriti)
Il file .rpt e' vuoto nn ho inserito nessun campo
Nel mio progetto ho un mioDataset.xsd (vuoto) nn tipizzato che carico da codice :
Private cnt As OleDbConnection
Private adp As OleDbDataAdapter
Private dt As mioDataset
Private sql As String = "SELECT * FROM tabella"
Try
cnt = New OleDbConnection(strCnt)
cnt.Open()
dt = New mioDataset
adp = New OleDbDataAdapter(sql, cnt)
adp.Fill(dt, "tabella")
Dim rep As New reportDocument 'file .rpt
Try
rep.SetDataSource(dt.Tables("tabella"))
Catch ex As Exception
cnt.close()
MsgBox(ex.Message, MsgBoxStyle.Critical, "ERRORE")
me.dispose(TRUE)
End Try
Me.CrystalReportViewer1.ReportSource = rep
cnt.Close()
Catch ex As Exception
cnt.Close()
MsgBox(ex.Message, MsgBoxStyle.Critical, "ERRORE")
End Try
l'errore che mi da nel try annidato e' che il report nn ha tabelle !!!
Qualcuno della comunita' mi sa aiutare ??
Grazie a tutti
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
ven 19 mag 2006 - 11:14
ciao,
non riciclare i messaggi, soprattutto se vecchi come questo che è di 1anno fa
altrimenti facciamo confusione...postalo come nuovo messaggio grazie
ciao.
Matteo Raumer
MCAD ... .net addicted :-)
http://blogs.dotnethell.it/freeteo
d3c0
Profilo
| Newbie
16
messaggi | Data Invio:
ven 19 mag 2006 - 12:52
opsss ...... ok
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !