Link to home
Start Free TrialLog in
Avatar of dlavar
dlavar

asked on

Syncfusion PDF

Is there anyway  I can populate a syncfusion pdf from an sql database with assign each value line by line?  I would like to bind the pdf to the database similar to binding a datasource to a gridview.  Right now, I use the following method.

Private Sub FillIncidentTable(ByVal form As PdfLoadedForm)
        Dim connFF = New SqlConnection(Application("connFF"))
        Dim FillCommand As New SqlCommand("spFFPrintIncident", connFF)
        FillCommand.CommandType = CommandType.StoredProcedure

        Dim Filladapt As New SqlDataAdapter(FillCommand)
        Dim DS As New DataSet()

        strcasenumber = listBox.SelectedValue

        Dim casenumber As New SqlParameter("@casenumber", SqlDbType.VarChar)
        casenumber.Value = strcasenumber
        FillCommand.Parameters.Add(casenumber)



        connFF.Open()
        Filladapt.Fill(DS)
        connFF.Close()

        Dim dt As DataTable
        dt = DS.Tables(0)
        Dim data As DataRow = dt.Rows(0)
           
       

        Dim status As String = data("vchcasestatus").ToString()
        If status = "Pending" Then
            TryCast(form.Fields("GroupStatus"), PdfLoadedRadioButtonListField).Items(0).Checked = True
        ElseIf status = "Inactive" Then
            TryCast(form.Fields("GroupStatus"), PdfLoadedRadioButtonListField).Items(1).Checked = True
        ElseIf status = "Closed" Then
            TryCast(form.Fields("GroupStatus"), PdfLoadedRadioButtonListField).Items(2).Checked = True
        End If
        TryCast(form.Fields("vchname"), PdfLoadedTextBoxField).Text = data("vchownerLast") + ", " + data("vchownerfirst") + " " + data("vchownermi")


    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Randy Knight, MCM
Randy Knight, MCM
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial