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
Report con piu' righe ...
giovedì 08 febbraio 2007 - 23.03
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
mr_rox\
Profilo
| Newbie
32
messaggi | Data Invio:
gio 8 feb 2007 - 23:03
Ciao a tutti...
nella mia applicazione Vb.Net 2005 con db oracle e stampe in Crystal Report 8versione integrata a Vbnet) ho la necessita' di fare delle stampe...
In particolare il mio problem asi verifica quando un report deve contenere un dettaglio : stampa sempre e solo la prima riga...
Di seguito posto il codice per chiarezza:
Dim crReportDocument As New ReportDocument
MsgBox(" Path : " & Application.StartupPath & " poi faccio \..\..\CR_cartellina.rpt")
crReportDocument.Load(Application.StartupPath & "\..\..\CR_cartellina.rpt")
''ADO.NET Variables
Dim adoOleDbConnection As OleDbConnection
Dim adoOleDbDataAdapter As OleDbDataAdapter
Dim dataSet As DataSet
'Add any initialization after the InitializeComponent() call
''Build a connection string
Dim connectionString As String = ""
connectionString = stringa_di_connessione
''Create and open a connection using the connection string
adoOleDbConnection = New OleDbConnection(connectionString)
''Build a SQL statement to query the datasource
Dim sqlString As String = ""
sqlString = "select PROTOCOLLO,CLI_DENOMINAZIONE,CLI_RAG_SOCIALE,CLI_INDIRIZZO,CLI_LOCALITA,CLI_CAP,CLI_PROVINCIA,"
sqlString = sqlString & "CLI_NUM_TEL,CLI_FAX,DEB_DENOMINAZIONE,DEB_INDIRIZZO,DEB_LOCALITA,DEB_CAP,DEB_PROVINCIA,DEB_NUM_TEL, "
sqlString = sqlString & "DEB_FAX, FUNZIONARIO, DATA_ATTIVAZIONE"
sqlString = sqlString & " from tab_rep_cartellina "
''''' LA TABELLA TAB_REP_CARTELLINA e' STAT PRECEDENTEENTE POPLATA CON DUE RECORD
''Retrieve the data using the SQL statement and existing connection
adoOleDbDataAdapter = New OleDbDataAdapter(sqlString, adoOleDbConnection)
''Create a instance of a Dataset
dataSet = New Ds_cartellina
''Fill the dataset with the data retrieved. The name of the table
''in the dataset must be the same as the table name in the report.
adoOleDbDataAdapter.Fill(dataSet, "tab_rep_cartellina")
''Create an instance of the strongly-typed report object
'crReportDocument = New CR_cartellina() ' cr_cartellina creata a somiglianza di tab_rep_cartellina
''Pass the populated dataset to the report
crReportDocument.SetDataSource(dataSet)
Dim frm_st As New Form1 ' form contenete il crystalViewer
Dim myprintoption As PrintOptions = crReportDocument.PrintOptions
' myprintoption.PaperSize = PaperSize.PaperB5
frm_st.CrystalReportViewer1.ReportSource = crReportDocument
frm_st.CrystalReportViewer1.Show()
frm_st.Show()
Ho provato anche a visualizzare i dati contenuti nel dataset ed effettivamente sono due righe., ma quando stampo ne mette solo una..
Le righe di dettaglio multiple ) le ho messe nella sezione 3 Details del report...
Grazie a chiunque vorra' ripsondermi..
Rocco
freeteo
Profilo
| Guru
6.542
messaggi | Data Invio:
dom 11 feb 2007 - 02:25
ciao,
se ne stampa solo una delle 2 penso proprio ci sia impostata una RecordSelectionformula, è l'unico motivo percui non stampi tutti i dati che gli vengono passati come SetDataSource.
Nel designer di visual studio,fiche' stai costruendo il report, se premi il "pseudo" bottone in basso "anteprima del report" ne vedi 2 di righe? se è impostata una selectionFormula ne dovresti vedere una sola anche li e quindi non è un problema di codice (che sembra giusto)...
ciao.
Matteo Raumer
[MCAD .net]
http://blogs.dotnethell.it/freeteo
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 !