|
-
Jun 24th, 2004, 01:37 PM
#1
Thread Starter
Lively Member
How do I connect between Sql Server and PDf
Hi,
I am trying to develop a windows form wherein the User selects the Info from a user table like his firstname, lastname, ssn and addInfo. Once he clicks the Submit button what I want is the fields that are entered in this forms have to be copied to a PDF file where there will be a space provided for this columns. Can anyone help me out how to do this. Ur help will be appreciated. And I am using VB.NET for the forms.
-
Jun 25th, 2004, 02:49 AM
#2
Frenzied Member
I think you have two ways to go with One using a third party class that creates PDF documents, and the other is using Crystal Reports to create a report (invisible to the user) and then export it to pdf via code.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Jun 25th, 2004, 07:39 AM
#3
Thread Starter
Lively Member
Hi Lunatic3
Thanks for ur reply. I would appreciate if u give me links how to do that using Crystal Reports I dont want to use third party providers. Thanks for ur help again
-
Jun 27th, 2004, 06:14 AM
#4
Hyperactive Member
Here are some code snippets which may help:
Dim Rpt1 As New ReportDocument
Dim RptName As String = "AnnualStatement"
Dim RptPath As String
RptPath = DbConn.ThisRpt
RptPath = Trim(RptPath) & "\Reports\" & RptName & ".rpt"
Rpt1.Load(RptPath)
Rpt1.ReportOptions.EnableSaveDataWithReport = False
...... This creates the document as a crystal report
Dim RptPth As String = DbConn.ThisRpt
Dim exp1 As New ExportOptions
Dim dsk1 As New DiskFileDestinationOptions
Dim Fnam As String = RptPth & "\Emails\" & "Annual Statement " & Format(FinEnd, "dd MM yyyy") & " " & Trim(Name) & ".pdf"
exp1 = Rpt1.ExportOptions
exp1.ExportFormatType = ExportFormatType.PortableDocFormat
exp1.ExportDestinationType = ExportDestinationType.DiskFile
dsk1.DiskFileName = Fnam
exp1.DestinationOptions = dsk1
Rpt1.Export()
....... This creates the PDF file and then exports it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|