Print Page | Close Window

Select Expert help

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=719
Printed Date: 14 May 2024 at 6:59pm


Topic: Select Expert help
Posted By: itochu27
Subject: Select Expert help
Date Posted: 22 May 2007 at 4:06am
Hi, Im totally new to crystal reports and I wanna know if ts possible to use visual basic variables in the select expert of CR.

I have a public variable .Public globalSocialSec As String. in a Module of my visual b project.

As my formula i have this: {Students.SegSoc} = "globalSocSec.text"

But this obviously is not comparing the globalSocSec variable contents with the data in students table. How can I solve this? is there an expression to pick up the contents of my VBasic project variable?



Replies:
Posted By: BrianBischof
Date Posted: 22 May 2007 at 10:34am
No, you can't pick up variables in a VB project. You can insert the value of a variable into a formula/parameter prior to the report running. For example, to update a formula you would use the following code:
myReport.DataDefinition.FormulaFields("formulaname")="'" & globalSocSec.Text & "'"




-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window