Posted By

derebus on 08/26/10


Tagged


Versions (?)

webing


 / Published in: ASP
 

  1. <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
  2. AutoDataBind="True" Height="70px" ReportSourceID="CrystalReportSource1"
  3. Width="250px" />
  4. <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
  5. <Report FileName="CrystalReport.rpt">
  6. </Report>
  7. </CR:CrystalReportSource>
  8.  
  9. Private Sub BindReport()
  10.  
  11. If Session("dtAlumno") IsNot Nothing Then
  12.  
  13. Dim crystalReport As New ReportDocument
  14. Dim dtAlumno As DataTable = New DataTable("dtAlumno")
  15. dtAlumno = Session("dtAlumno")
  16. Dim dsDataSet As New DataSet
  17. Dim dt As DataTable = dtAlumno.Copy
  18.  
  19. dsDataSet.Tables.Add(dt)
  20. dsDataSet.Tables(0).TableName = "dtAlumno"
  21. crystalReport.Load("D:\Version 2008\Interfaz\CrystalReport.rpt")
  22. crystalReport.SetDataSource(dsDataSet.Tables("dtAlumno"))
  23. CrystalReportViewer1.ReportSource = crystalReport
  24. 'CrystalReportViewer1.DataBind()
  25.  
  26. End If
  27. End Sub

Report this snippet  

You need to login to post a comment.