2nd question::
Let say I have a VB Express 2010 from wiht a text box and command button on it. I want to pass the textbox text to crystal report(wchih is stored in D drive) when the command button is pressed.
What the code would be..Is it doable? Do i have to make some control(formula, textbox)on the crystal report which is able receive the text from vb form.. Plz help me..
Thanks in advance..
I often get VB 2003/2005 code snippets that do not work with Vb 2008/2010, so I would like to request Danish to kindly update the code for later versions. | |
Sign in· View Thread | ![]() |
Very usefull i am in debt to you! | |
Sign in· View Thread | ![]() |
I am pretty new to VB but have been using Crystal Reports and MS SQL for 2 years now. I am having a bit of a problem understanding your code. I was wondering if any body could help. I have a vb form with a button on it that calls the report. I copied the code that does the report call and get an error on this line: objForm.ViewReport("C:\contract.rtp", , "@prmRecId=RecId&@prmBgnDate='06/01/09'")
the error is with the objForm.ViewReport it says "ViewReport" is not a member of projectname.frmViewReport, here is the entire code
Private Sub btnContract_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnContract.Click
Dim objForm As New frmViewReport
objForm.ViewReport("C:\Develop\JawoodSql-New\CrystlRpts\contracttest.rpt", "@prmCmpny=jawood=&@prmRpt=contract&@prmPayBillId=13935")
objForm.Show()
Also, where does the long bit of code go for the Friendly, becasue no matter where I put it some of the code shows up fine and the rest of the code isgrayed out.
Any help in this matter is greatly appreciated.
Nickspi 12-Jun-09 7:47Excuse me. can someone send me an example from his project with his crystal reports? thnx | |
Sign in· View Thread | ![]() |
but the Desired Out put should look like this (with out the values are being repeated :
Id Name Languages Alownces Allow Name
001 John English 200.00 Transport
001 John French 300.00 Fuel
I am using a Crystal reports 8.5 with VB 2008 Express. I am able to view the report in my own machine. But when I install in another machine I get a Blank grey screen without any warning. I used Try catch, without use.
Am I missing any dll file .
Thanks for ur help
bunary2k 19-Feb-09 21:48i have made report with frmviewreport.
after user click print dialog there will be another form.
to choose -> print-cancel-apply.
how i know the user click the button?
print/cancel/apply.
i need to know the what button user choose.
because after the document success printed the document can't be
print anymore,so after user click print i must update the database
and give a flag of the data.
Option Strict On
Option Explicit On
Imports System.Data
Imports System.Configuration
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Public Class para_list
Inherits System.Windows.Forms.Form
Dim con As String = System.Configuration.ConfigurationManager.AppSettings("connectingstring")
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
Dim rptshow As New ReportDocument()
Try
rptshow.Load("parameterlist.rpt")
For Each tbCurrent In rptshow.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
crystalreportviewer1.ReportSource = rptshow
crystalreportviewer1.Zoom(2)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "General Error")
End Try
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles crystalreportviewer1.Load