|  | 
	                
  
    |  |  
    | 
        
        ผมดึง CrystalReport ออกมา print ไม่ได้ รบกวนดูให้หน่อยครับ     |  
    |  |  
 
              
  
    | 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ใช้ vb6 
 Private Sub cmbcryReport1_Click()
 Dim S As String, iFM As String
 S = App.Path & "\Workplace.rpt"
 iFM = ""
 With CrystalReport1
 .ReportFileName = S
 .Connect = "PWD=" & PWD_
 iFM = "{savedocter.Workplace_lab} = '" & Trim(cmbWorkplace_lab.Text) & " ' "
 .ReplaceSelectionFormula (iFM)
 .Action = 1
 .PageZoom (1)
 End With
 End Sub
 
 vb.net 2008
 
 Dim ParamName As New ParameterDiscreteValue
 ParamName.Value = Check_doc
 
 Dim ParamFld As New ParameterField
 ParamFld.ParameterFieldName = "Check_doc"
 ParamFld.CurrentValues.Add(ParamName)
 
 Dim ParamField As New ParameterFields
 ParamField.Add(ParamFld)
 
 CrystalReportViewer1.ParameterFieldInfo = ParamField
 CrystalReportViewer1.ReportSource = New REPORT_DATA_ORDER_UNCONDITIONAL()
 Return
 
 |  
              | 
 ประวัติการแก้ไข
 2011-03-30 08:47:14
 2011-03-30 08:48:11
 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-03-30 08:42:28 | By :
                            angelrings0 |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ไม่ใช่ VB6 หรอก 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-03-30 08:46:38 | By :
                            exclusiveM |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | เอาไปลองดูนะคับ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-03-30 08:48:32 | By :
                            angelrings0 |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | พอดีว่าสร้างรายวานด้วย Crystal Report10 ใน ASP.NET(VS 2003) เป็น WEB ค่ะ แล้วสร้างปุ่ท Print ขึ้นมาพอแสดงรายงานเสร็จก็ให้กดปุ่ม Print เพื่อสั่งพิมพ์รายงาน แต่พอกดที่ปุ่ม Print แล้วมันขึ้น Error ตามรูปค่ะ 
 
  
 ส่วนนี้เป็น Code ในปุ่ม Print ค่ะ
 
 
 Private Sub BtnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPrint.Click
 
 Dim RptDoc As New ReportDocument
 RptDoc = Me.Session("ReportSource")
 Response.Buffer = False
 Response.ClearContent()
 Response.ClearHeaders()
 RptDoc.SetDatabaseLogon("sa", "p@p3r", "PLE", "Thailand_ekp")
 RptDoc.PrintOptions.PrinterName = "EPSON Stylus Photo R230 Series on it-pc1"
 RptDoc.Load("RptProductOfMonth.rpt")
 RptDoc.PrintToPrinter(1, False, 0, 0)
 
 End Sub
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2011-05-28 11:17:12 | By :
                            เปิ้ล (พิมพ์ณภา) |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |  |