Vatansever
Asistan
- Katılım
- 23 Ağustos 2007
- Mesajlar
- 405
- Reaksiyon puanı
- 1
- Puanları
- 18
Arkadaşlar basit bir fatura yazdırma işlemi gerçekleştirmek istiyorum alınan ürünlerin listesi bir datagridde yazılı bunları datagridden yazdırıyorum hepsi güzel burda hiçbir sorun yok ama faturanın bazı yerlerine programın içinde bulunan textbox'lardaki verileri yazdıramıyorum ReportParameter işlemini yapamıyorum YANİ Report1.rdlc dosyasının içinde bir TextBox oluşturuyorum bu textbox'unda veriyi programdaki bir textbox'tan çekmesini istiyorum bu işi nasıl yapabilirim kullandığım kod aşağıda aşağıdaki kod benim gerçek projemin değil bu işi başarmak için yazmaya çalıştığım test projesinin ama mantık aynı datagrid içindeki bilgiler faturada listelenecek textboxların içindeki bilgilerde faturadaki textbox'larda görüntülenecek
	
	
	
		
--- Mesaj Güncellendi ---
Aşağıdaki kod gibi değişik kodlar buluyorum ama sonuç başarısız
	
	
	
		
			
			
		Kod:
	
	Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim ds As New DataSet1
        Dim satır As DataRow
        For i As Integer = 0 To Form1.DataGridView1.Rows.Count - 1
            satır = ds.Tables("DataTable1").NewRow()
            satır("İsim") = Form1.DataGridView1.Rows(i).Cells(0).Value
            satır("Soyadı") = Form1.DataGridView1.Rows(i).Cells(1).Value
            satır("Ünvanı") = Form1.DataGridView1.Rows(i).Cells(2).Value
            satır("Yaşı") = Form1.DataGridView1.Rows(i).Cells(3).Value
            ds.Tables("DataTable1").Rows.Add(satır)
        Next i
        Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
        Me.ReportViewer1.LocalReport.ReportPath = System.Environment.CurrentDirectory & "\Report1.rdlc"
        Me.ReportViewer1.LocalReport.DataSources.Clear()
        Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", ds.Tables(0)))
        Me.ReportViewer1.DocumentMapCollapsed = True
        Me.ReportViewer1.RefreshReport()
    End Sub--- Mesaj Güncellendi ---
Aşağıdaki kod gibi değişik kodlar buluyorum ama sonuç başarısız
		Kod:
	
	  [COLOR=blue][FONT=Consolas]Private[/FONT][/COLOR][COLOR=blue][FONT=Consolas]Sub[/FONT][/COLOR][COLOR=black][FONT=Consolas] ParametreAyarla()[/FONT][/COLOR]
  [COLOR=blue][FONT=Consolas]Dim[/FONT][/COLOR][COLOR=black][FONT=Consolas] parameters [/FONT][/COLOR][COLOR=blue][FONT=Consolas]As[/FONT][/COLOR][COLOR=#2B91AF][FONT=Consolas] ReportParameter[/FONT][/COLOR][COLOR=black][FONT=Consolas]() = [/FONT][/COLOR][COLOR=blue][FONT=Consolas]New [/FONT][/COLOR][COLOR=#2B91AF][FONT=Consolas]ReportParameter[/FONT][/COLOR][COLOR=black][FONT=Consolas](1) {}[/FONT][/COLOR]
  [COLOR=black][FONT=Consolas]        parameters(0) = [/FONT][/COLOR][COLOR=blue][FONT=Consolas]New[/FONT][/COLOR][COLOR=#2B91AF][FONT=Consolas] ReportParameter[/FONT][/COLOR][COLOR=black][FONT=Consolas]([/FONT][/COLOR][COLOR=#A31515][FONT=Consolas]"ReportParameter1"[/FONT][/COLOR][COLOR=black][FONT=Consolas], [/FONT][/COLOR][COLOR=black][FONT=Consolas]Form1.TextBox1.Text[/FONT][/COLOR][COLOR=black][FONT=Consolas])[/FONT][/COLOR]
  [COLOR=black][FONT=Consolas]        parameters(1) = [/FONT][/COLOR][COLOR=blue][FONT=Consolas]New[/FONT][/COLOR][COLOR=#2B91AF][FONT=Consolas] ReportParameter[/FONT][/COLOR][COLOR=black][FONT=Consolas]([/FONT][/COLOR][COLOR=#A31515][FONT=Consolas]"ReportParameter2"[/FONT][/COLOR][COLOR=black][FONT=Consolas], [/FONT][/COLOR][COLOR=blue][FONT=Consolas]New[/FONT][/COLOR][COLOR=blue][FONT=Consolas] String[/FONT][/COLOR][COLOR=black][FONT=Consolas]() {[/FONT][/COLOR][COLOR=#A31515][FONT=Consolas]"14335"[/FONT][/COLOR][COLOR=black][FONT=Consolas], [/FONT][/COLOR][COLOR=#A31515][FONT=Consolas]"15094"[/FONT][/COLOR][COLOR=black][FONT=Consolas]})[/FONT][/COLOR]
  [COLOR=blue][FONT=Consolas]Me[/FONT][/COLOR][COLOR=black][FONT=Consolas].ReportViewer1.ServerReport.SetParameters(parameters)[/FONT][/COLOR]
  [COLOR=blue][FONT=Consolas]End[/FONT][/COLOR][COLOR=blue][FONT=Consolas]Sub[/FONT][/COLOR] 
					
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		