Click here to Skip to main content
16,005,124 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Sub Procedure Pin
Anonymous13-Oct-04 19:14
Anonymous13-Oct-04 19:14 
General[VB.NET] Unicode by default Pin
Anonymous13-Oct-04 12:42
Anonymous13-Oct-04 12:42 
GeneralRe: [VB.NET] Unicode by default Pin
Anonymous13-Oct-04 16:32
Anonymous13-Oct-04 16:32 
QuestionHow can I connect two Computers Pin
Waleed Eissa13-Oct-04 11:08
Waleed Eissa13-Oct-04 11:08 
AnswerRe: How can I connect two Computers Pin
Anonymous13-Oct-04 16:55
Anonymous13-Oct-04 16:55 
GeneralEXPORT PDF from VB.NET Pin
partt13-Oct-04 10:28
partt13-Oct-04 10:28 
GeneralRe: EXPORT PDF from VB.NET Pin
Jim Matthews13-Oct-04 11:03
Jim Matthews13-Oct-04 11:03 
GeneralRe: EXPORT PDF from VB.NET Pin
partt13-Oct-04 11:39
partt13-Oct-04 11:39 
The error reads "Invalid report file path."
And is thrown by: CrystalReportDocument.SetDataSource(ds)

Other than that, I can load the template.rpt and send it as a PDF to it's location, I just can't populate the .rpt now.

Below is the updated code:
Dim PKCalls As DataTable = DirectCast(Session("GetPKCallS"), DataTable)
PKCalls = New DataTable()
Dim sc As New PK.BusinessLogicLayer.Consumer()
Dim tDay As Integer
Dim tCall As Integer
Dim DD As String
Dim CallActivity As String
tDay = Integer.Parse(txtPast.Text)
tCall = Integer.Parse(txtCall.Text)
DD = Today.AddDays(-tDay)
CallActivity = Today.AddDays(-tCall)
PKCalls = sc.GetPKCallSheet(txtGender.Text, txtRace.Text, lblUpDOB.Text, lblLowDOB.Text, ddlSite.SelectedItem.Value, DD, CallActivity)
Session("GetPKCallS") = PKCalls

Dim ds As New DataSet()
ds.Tables.Add(Session("GetPKCallS"))

Dim N As String
N = "CallSheets" & Session("userOffice") & Now & ".PDF"
N = Replace(N, Chr(32), "")
N = Replace(N, ":", "")
N = Replace(N, "/", "")

Dim CrystalReportDocument As ReportDocument
Dim CrystalExportOptions As ExportOptions
Dim CrystalDiskFileDestinationOptions As DiskFileDestinationOptions

Dim Filename As String
CrystalReportDocument = New ReportDocument()
CrystalReportDocument.SetDataSource(ds)
CrystalReportDocument.Load("path to .rpt")

Filename = "destination path" & N

CrystalDiskFileDestinationOptions = New DiskFileDestinationOptions()
CrystalDiskFileDestinationOptions.DiskFileName = Filename
CrystalExportOptions = CrystalReportDocument.ExportOptions
With CrystalExportOptions
.DestinationOptions = CrystalDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With
CrystalReportDocument.Export()

Thank you for your help!
GeneralRe: EXPORT PDF from VB.NET Pin
Jim Matthews14-Oct-04 3:12
Jim Matthews14-Oct-04 3:12 
GeneralRe: EXPORT PDF from VB.NET Pin
partt14-Oct-04 4:30
partt14-Oct-04 4:30 
GeneralRe: EXPORT PDF from VB.NET Pin
Jim Matthews14-Oct-04 5:27
Jim Matthews14-Oct-04 5:27 
GeneralRe: EXPORT PDF from VB.NET Pin
partt14-Oct-04 6:54
partt14-Oct-04 6:54 
GeneralRe: EXPORT PDF from VB.NET Pin
Jim Matthews14-Oct-04 8:11
Jim Matthews14-Oct-04 8:11 
GeneralRe: EXPORT PDF from VB.NET Pin
partt14-Oct-04 9:35
partt14-Oct-04 9:35 
GeneralRe: EXPORT PDF from VB.NET Pin
Jim Matthews14-Oct-04 10:36
Jim Matthews14-Oct-04 10:36 
GeneralRe: EXPORT PDF from VB.NET Pin
partt15-Oct-04 5:14
partt15-Oct-04 5:14 
GeneralCreditcard validation Pin
lathashrik13-Oct-04 6:41
lathashrik13-Oct-04 6:41 
GeneralRe: Creditcard validation Pin
Colin Angus Mackay13-Oct-04 6:48
Colin Angus Mackay13-Oct-04 6:48 
Generalauto Launch after install vb.net Pin
Steve6913-Oct-04 6:11
Steve6913-Oct-04 6:11 
GeneralRe: auto Launch after install vb.net Pin
Anonymous13-Oct-04 9:07
Anonymous13-Oct-04 9:07 
GeneralRe: auto Launch after install vb.net Pin
Steve6913-Oct-04 23:26
Steve6913-Oct-04 23:26 
GeneralRe: auto Launch after install vb.net Pin
Anonymous13-Oct-04 11:16
Anonymous13-Oct-04 11:16 
Questiondata grid? Pin
unambiguos13-Oct-04 4:09
unambiguos13-Oct-04 4:09 
AnswerRe: data grid? Pin
Mekong River13-Oct-04 4:14
Mekong River13-Oct-04 4:14 
GeneralRe: data grid? Pin
unambiguos13-Oct-04 20:46
unambiguos13-Oct-04 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.