anand m

anand m

  • 1.4k
  • 346
  • 35.6k

how to convert string to Unicode using Classic asp

Nov 15 2021 5:07 PM

Hello All,

 

I am loading Cyrstal report rpt(9.0)  data  into PDF format.

But before laoding crystal report data to PDF I am using below code .

'Create a new ReportClientDocument object for this reportAppSession
Set previewoClientDoc = previewrptAppSession.CreateService("CrystalClientDoc.ReportClientDocument")

'Open the report
previewoClientDoc.Open previewReportName

'Logon to database, if necessary
previewoClientDoc.DatabaseController.Logon CovletLoginID, CovletPasswd

'Copy existing parameter to NewParam object
Set previewNewParam = previewoClientDoc.DataDefinition.ParameterFields(0).Clone

'Create new "DiscreteValue" object to hold new parameter's value
Set previewNewValue = previewobjFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue")

previewNewValue.Value = Trim(previewSampleCheck)

'Set the new value for the parameter
previewNewParam.CurrentValues.Add(previewNewValue)

'Modify the first parameter field with the NewParam object
previewoClientDoc.DataDefController.ParameterFieldController.Modify 0, previewNewParam

'Create a new PrintOutputController object
Dim previewoPrintOutputController
Set previewoPrintOutputController = previewoClientDoc.PrintOutputController

Dim previewiFormat
previewiFormat = CInt("5")

Dim previewoByteArray
Set previewoByteArray = previewoPrintOutputController.Export(previewiFormat)

Select Case session("covlet_ReportType")
    Case "0"
        previewPhysicalPDFFileName = Application("OutputPath") & previewSampleCheck & ".pdf"
    Case "1"
        previewPhysicalPDFFileName = Application("OutputPath") & previewSampleCheck & "_PCCT" & ".pdf"
    Case "2"
        previewPhysicalPDFFileName = Application("OutputPath") & previewSampleCheck & "_DT" & ".pdf"
End Select

previewoByteArray.Save previewPhysicalPDFFileName, True

 

In this code I need to convert to unicode load into PDF and how to convert unicode using above code.


Answers (1)