Click to See Complete Forum and Search --> : Pass VB.NET value in Crystal Report.NET
Abbas Haider
Mar 17th, 2009, 04:40 AM
Hi
I have to find out how to pass VB.NET value in Crystal Report.NET
I am using formula field.
Actually I have to set login ID from my VB.NET program to be passed in Crystal report
I will declare a global variable but how will I pass it in VB
Thanks
Hack
Mar 23rd, 2009, 06:46 AM
This might help...
http://vb.net-informations.com/crystal-report/vb.net_crystal_reports_tutorials.htm
mwells
Apr 2nd, 2009, 12:20 PM
Suggestion:
In Crystal Reports create a new Parameter Field and your formula field.
In VB create your global variable, add a new form to your project, and then add a Crystal Reports viewer to the form.
To pass the value to the report you can use the Form's load event something like this...
Private Sub MyForm_Load(ByVal sender As Object, ByVal e As .....)
dim CReport as new MyCrystalReportName
Me.CrystalReportViewer1.SetParameterValue("CR_parameterName", VBvar)
CrystalReportViewer1.ReportSource = CReport
End Sub
In Crystal Reports use the parameter in the formula field to pass the value. Hope this help.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.