  | 
                       | 
          
            
               
                 ข้อมูลเพิ่มเติม :  
 
ถ้าเลือก print โดยใช้ PDFCreator or AdobePDF Font ภาษาไทยไม่เพี้ยนครับ  
 
Code export บน VB6 : 
 
Dim oXApp As CRAXDRT.Application 
Dim oXRpt As CRAXDRT.Report 
Dim oXOpt As CRAXDRT.ExportOptions 
 
On Error GoTo ExportErr 
 
Set oXApp = CreateObject("CrystalRuntime.Application") 
 
Set oXRpt = oXApp.OpenReport(CrystalReport1.ReportFileName)  '"\C0562.rpt") 
 
 
 
If producttype = "¢Í§á¢ç§" Then 
qs = "Select * from invoice where Year(invoicedate) =  '" & (Format(DP_date.Value, "yyyy")) & "'and Month(invoicedate) = '" & (Format(DP_date.Value, "mm")) & "' and Day(invoicedate) = '" & (Format(DP_date.Value, "dd")) & "' and substring(productname,1,2) = 'CS' order by licenseid,priority  asc" 
ElseIf producttype = "¢Í§àËÅÇ" Then 
qs = "Select * from invoice where Year(invoicedate) =  '" & (Format(DP_date.Value, "yyyy")) & "'and Month(invoicedate) = '" & (Format(DP_date.Value, "mm")) & "' and Day(invoicedate) = '" & (Format(DP_date.Value, "dd")) & "' and substring(productname,1,2) <> 'CS' order by licenseid,priority  asc" 
ElseIf producttype = "·Ñé§ËÁ´" Then 
qs = "Select * from invoice where Year(invoicedate) =  '" & (Format(DP_date.Value, "yyyy")) & "'and Month(invoicedate) = '" & (Format(DP_date.Value, "mm")) & "' and Day(invoicedate) = '" & (Format(DP_date.Value, "dd")) & "' order by licenseid,priority asc" 
Else 
 If MsgBox("¡ÃسÒÃкػÃÐàÀ·ÊÔ¹¤éÒ !!!", vbCritical + vbOKOnly, "Warning") = vbOK Then 
  producttype.SetFocus 
  Exit Sub 
 End If 
 End If 
 
With oXRpt 
    .SQLQueryString = qs 
    .EnableParameterPrompting = False 
    .MorePrintEngineErrorMessages = True 
End With 
 
 
 
Set oXOpt = oXRpt.ExportOptions 
 
With oXOpt 
    .DestinationType = crEDTDiskFile 
    .DiskFileName = App.Path & "\Reports\ÃÒ§ҹ½èÒ¢Ò - SA-F19 R02 ÃÒ§ҹÊè§«ÔÅÔࡵ»ÃШÓÇѹ.pdf" 
    .FormatType = crEFTPortableDocFormat 
    .PDFExportAllPages = True 
     
End With 
 
oXRpt.Export False  'throws missing or out-of-date dll error 
 
ExportErr: 
  MsgBox Err.Number & ", " & Err.Description                        
               
               | 
             
            
              
			                              
                              
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2019-05-03 16:05:09 | 
                        By :
                            kittichai.l | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             |