Re: Passing Parameter from VB to Crystal Report
If, you want to show the report for only some conditions say from 1900 to 2000 then
ToText(Year ({Profile.BDAY}) Between 1900 and 2000)
can be used as the record selection formula.
For example, I am building crystal report based on Dataenvironment, in that I am adding a command1 which is linked to a table(EmpId,Name)
Then condition can be
{Dataenviroment1.Empid}='1' which is your recordselection formula
same way, you can try
right Click on the Year field in Crystal reports(Design view)
Choose Select Expert, chose formula,
copy the formula and alter it.
Any help,
mail back
Thank You.
Re: Passing Parameter from VB to Crystal Report
Hi.
I tried your suggestion and put the code in VB but VB issued this error:
Run-time error: '20515':
Error in formula <Record_Selection>.
'ToText(Year ({Profile.BDAY}) Between 1900 and 2000)'
The ) is missing.
When I enclosed the values 1900 and 2000 with single quotes, the same error appeared.
In Crystal, the same error showed up in the Select Records Expert formula editor.