Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. ReportDocument won't Export / vbnet

ReportDocument won't Export / vbnet

Scheduled Pinned Locked Moved Visual Basic
databasehelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    partt
    wrote on last edited by
    #1

    I'm using the following code. I want to send a populated CrystalReport to a location as a PDF when the Totals button is clicked. When I keep what is between the *'s, nothing gets exported, there are no errors either. When I comment out what is between the *'s, the unpopulated .rpt file gets sent to the destination as a PDF. Please Help! Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then Dim tDay As Integer Dim tCall As Integer Dim DD As DateTime Dim CallActivity As DateTime tDay = Integer.Parse(txtPast.Text) tCall = Integer.Parse(txtCall.Text) DD = Today.AddDays(-tDay) CallActivity = Today.AddDays(-tCall) Dim UD As DateTime UD = lblUpDOB.Text.Trim Dim LD As DateTime LD = lblLowDOB.Text.Trim SetReportParam(txtGender.Text, txtRace.Text, UD, LD, ddlSite.SelectedItem.Value, DD, CallActivity) End If End Sub Private Sub SetReportParam(ByVal SexID As String, ByVal RaceID As String, ByVal UpDOB As DateTime, ByVal LowDOB As DateTime, ByVal SiteID As String, ByVal DD As DateTime, ByVal CallActivity As DateTime) rDoc1.Load("path to .rpt") Dim logonInfo As New TableLogOnInfo() Dim i As Integer For i = 0 To rDoc1.Database.Tables.Count - 1 logonInfo.ConnectionInfo.ServerName = "servername" logonInfo.ConnectionInfo.DatabaseName = "dbname" logonInfo.ConnectionInfo.UserID = "uid" logonInfo.ConnectionInfo.Password = "pwd" rDoc1.Database.Tables.Item(i).ApplyLogOnInfo(logonInfo) Next Dim paramFields As New ParameterFields() Dim paramField As New ParameterField() Dim discreteValue As New ParameterDiscreteValue() Dim rangeValue As New ParameterRangeValue() paramField.ParameterFieldName = "SexID" discreteValue.Value = SexID paramField.CurrentValues.Add(discreteValue) paramFields.Add(paramField) paramField.ParameterFieldName = "RaceID" discreteValue.Value = RaceID paramField.CurrentValues.Add(discreteValue) paramFields.Add(paramField) paramField.ParameterFieldName = "LBirth" discreteValue.Value = UpDOB paramField.CurrentValues.Add(discreteValue) paramFields.Add(paramField) paramField.ParameterF

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups