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. from vb.net crystal report result directly export to pdf

from vb.net crystal report result directly export to pdf

Scheduled Pinned Locked Moved Visual Basic
csharp
3 Posts 2 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.
  • U Offline
    U Offline
    User 3207037
    wrote on last edited by
    #1

    Hello everybody, I am calling crystal report file i.e .rpt file from desktop application which is in vb.net 1.1 > On click Print button, It display result in crystal report and after click on option export from crystal report file , i gets result in pdf file. Now, i want whenever i click print , i want directly get result in pdf instead getting result in crystal report then export . Regards Shailesh Kavalkar

    D 2 Replies Last reply
    0
    • U User 3207037

      Hello everybody, I am calling crystal report file i.e .rpt file from desktop application which is in vb.net 1.1 > On click Print button, It display result in crystal report and after click on option export from crystal report file , i gets result in pdf file. Now, i want whenever i click print , i want directly get result in pdf instead getting result in crystal report then export . Regards Shailesh Kavalkar

      D Offline
      D Offline
      D4ever
      wrote on last edited by
      #2

      Imports CrystalDecisions.Web Imports CrystalDecisions.Shared Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.CrystalReports.Engine.ReportDocument Partial Class test Inherits System.Web.UI.Page Dim cn As OledbConnection Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Call ShowReport() End Sub Sub ShowReport() ''*************************************************************************************** ''Don't change any line in the below code or the report will not work as expected ''*************************************************************************************** Dim ConnInfo As New ConnectionInfo With ConnInfo .DatabaseName = "test" End With Dim rpt As New ReportDocument rpt.Load(Server.MapPath("Abc.rpt")) Dim ParamFields As ParameterFields = Me.CrystalReportViewer.ParameterFieldInfo Dim ParamField As New ParameterField Dim ParamField_Value As New ParameterDiscreteValue ParamField.Name = "frmdt" ParamField_Value.Value = Session("FROMDATE") ''frmDate ''"30-Oct-2007 12:00:00" ParamField.CurrentValues.Add(ParamField_Value) rpt.ParameterFields("frmdt").CurrentValues.Add(ParamField_Value) ParamFields.Add(ParamField) ParamField = New ParameterField ParamField_Value = New ParameterDiscreteValue 'Here todt is the parameter name Created in Report ParamField.Name = "todt" ParamField_Value.Value = Session("TODATE") ''ToDate ''"31-Oct-2007 12:00:00" ParamField.CurrentValues.Add(ParamField_Value) rpt.ParameterFields("todt").CurrentValues.Add(ParamField_Value) ParamFields.Add(ParamField) ''*********** VERY IMPORTANT ''***************** ''Whenever using Parameter passing to CR :- Assigning the ParameterFields object to the ParameterFieldInfo of the CrystalReportViewer object programmatically will also suppress the default dialog asking for parameters that normally appears when you open a report with parameters. Me.CrystalReportViewer.ParameterFieldInfo = ParamFields For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer.LogOnInfo cnInfo.ConnectionInfo = ConnInfo Next '======================================================================================================== 'To Open Report In

      1 Reply Last reply
      0
      • U User 3207037

        Hello everybody, I am calling crystal report file i.e .rpt file from desktop application which is in vb.net 1.1 > On click Print button, It display result in crystal report and after click on option export from crystal report file , i gets result in pdf file. Now, i want whenever i click print , i want directly get result in pdf instead getting result in crystal report then export . Regards Shailesh Kavalkar

        D Offline
        D Offline
        D4ever
        wrote on last edited by
        #3

        hi did u tried it?

        Darshana Pathak

        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