5 Replies - 1964 Views - Last Post: 08 April 2013 - 06:18 PM Rate Topic: -----

#1 jaijune02  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 17-October 12

how to display tamil language font in vb 6 ms flex grid tool

Posted 07 April 2013 - 06:49 AM

I have inserted the product names(tamil language font) in sql table and i am trying to display in vb 6 MS Flex Grid Tool, whereas the data in grid displays like a question mark "????", does i need to follow anything in vb 6 to display other than english language font...

Here's my vb code:

Private Sub Form_Load()
If rs.State = 1 Then rs.Close
sql = "select pname from product where pno=1"
rs.Open sql, myconection, adOpenForwardOnly
Grid1.Row = 1
Grid1.Col = 1
Grid1.CellFontName = "Vijaya"  ' tamil font name
Grid1.TextMatrix(1, 1) = rs.Fields(0)
End Sub





Is This A Good Question/Topic? 0
  • +

Replies To: how to display tamil language font in vb 6 ms flex grid tool

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: how to display tamil language font in vb 6 ms flex grid tool

Posted 07 April 2013 - 09:03 AM

The problem is that MSFlexGrid doesn't support Unicode (two-byte character length instead of one-byte as in ASCII) fonts. A good substitute is the MSHFlexGrid. Try using that instead. (Microsoft Hierarchical Flex Grid control.) See here.
Was This Post Helpful? 0
  • +
  • -

#3 jaijune02  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 17-October 12

Re: how to display tamil language font in vb 6 ms flex grid tool

Posted 07 April 2013 - 09:16 AM

Thank for your reply sir, it works .....
Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: how to display tamil language font in vb 6 ms flex grid tool

Posted 07 April 2013 - 09:20 AM

Glad to hear it. Well done on following through.
Was This Post Helpful? 0
  • +
  • -

#5 jaijune02  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 17-October 12

Re: how to display tamil language font in vb 6 ms flex grid tool

Posted 08 April 2013 - 01:10 PM

Sir, am having another doubt in vb6 datareport...

Scenario :
Selecting two invoices from the list box : INV001 and INV002
Expecting Result :
want to display each invoice to appear on a new page in data report.
Current Result :
the below code suitable to generate single invoice only .


Private Sub Rpt1_Click(Index As Integer)
'On Error GoTo ErrHandler
Dim cmd As New ADODB.Command
Dim cmd1 As New ADODB.Command
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim qryip As String

        If rs.State = 1 Then rs.Close
        cmd.ActiveConnection = myconection

        cmd.CommandType = adCmdStoredProc
        cmd.CommandText = "proc_rpt1_billprintheader"
        cmd.CreateParameter
        cmd.Parameters.Append cmd.CreateParameter(billid", adInteger, adParamInput, 4, bill_id)

        rs.CursorType = adOpenForwardOnly
        rs.CursorLocation = adUseClient
        rs.Open "SET NOCOUNT ON", myconection
        rs.Open cmd

        cmd1.ActiveConnection = myconection
        cmd1.CommandType = adCmdStoredProc
        cmd1.CommandText = "proc_rpt1_billprintdetails"
        cmd1.CreateParameter
        cmd.Parameters.Append cmd.CreateParameter(billid", adInteger, adParamInput, 4, bill_id)

        If rs1.State = 1 Then rs1.Close
        rs1.CursorType = adOpenForwardOnly
        rs1.CursorLocation = adUseClient
        rs1.Open "SET NOCOUNT ON", myconection
        rs1.Open cmd1

        If rs.EOF Then
            MsgBox "No Records Found", vbInformation, "CMS"
        Else
            rs.MoveFirst
            rs1.MoveFirst
            With billprint

                Set .DataSource = Nothing
                .DataMember = ""
                Set .DataSource = rs.DataSource
                n = 0



                .Sections("Section4").Controls.Item("sys_billno").Caption = rs.Fields(0).Value
                .Sections("Section4").Controls.Item("bill_date").Caption = rs.Fields(1).Value
                .Sections("Section4").Controls.Item("ret_name").Caption = rs.Fields(2).Value

                .Sections("Section5").Controls.Item("grossamt").Caption = Format(rs.Fields(3).Value, "0.00")
                .Sections("Section5").Controls.Item("vatamt").Caption = Format(rs.Fields(4).Value, "0.00")
                .Sections("Section5").Controls.Item("roundoffamt").Caption = Format(rs.Fields(5).Value, "0.00")
                .Sections("Section5").Controls.Item("netamt").Caption = Format(rs.Fields(6).Value, "0.00")
                
                Set .DataSource = Nothing
                .DataMember = ""
                Set .DataSource = rs1.DataSource
               
                            
                Do Until rs1.EOF
                                        
                    .Sections("Section1").Controls.Item("prdname").DataField = rs1.Fields(0).Name
                    .Sections("Section1").Controls.Item("batch").DataField = rs1.Fields(1).Name
                    .Sections("Section1").Controls.Item("qty").DataField = rs1.Fields(2).Name
                    .Sections("Section1").Controls.Item("lineamt").DataField = rs1.Fields(3).Name
                                        
                    rs1.MoveNext
                   
                Loop
            End With
        End If

    billprint.Orientation = rptOrientPortrait
    billprint.Show
End Sub


Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: how to display tamil language font in vb 6 ms flex grid tool

Posted 08 April 2013 - 06:18 PM

I'm sorry, I have never used the DataReport control. You might consider installing Crystal Reports. There's an old version that comes with VB6.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1