|
|
export PDF จาก crystal report 8.5 หรือ vb6.0 font Thai เพี้ยน |
|
|
|
|
|
|
|
ข้อมูลเพิ่มเติม :
ถ้าเลือก 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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แต่ ถ้าใช้ vb6 export หรือ export ผ่านทาง crystal report 8.5 Font ภาษาไทยจะเพี้ยน
ถ้าไม่ export เป็นสั่ง print ผ่านทาง PDFCreator หรือ Adobe PDF Font ภาษาไทยจะไม่เพี้ยน
|
|
|
|
|
Date :
2019-05-03 16:14:04 |
By :
kittichai.l |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|