Syncfusion PDF

Posted on 2013-10-21
Medium Priority
Last Modified: 2013-10-22
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


        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

Question by:dlavar
1 Comment

Accepted Solution

Randy Knight, MCM earned 1500 total points
ID: 39588264
I'm not familiar with Syncfusion but I would think you'd need to iterate your datatable in a For .. Each loop and write the data out to the pdf.  I've never seen a PDF component that allows binding like you are trying to do.

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question