1
votes

I have a problem on displaying records in crystal reports, I am making a report on displaying the personal information of an employee. I made a parameter for Employee ID in which you have to enter the Employee's ID to view his/her information and print it. But I don't have the option to choose all the employee in which I can print all the employees profile at once. What I wanted to happen is that when I am not entering any Employee ID from the text-box it will display all the Employee information or profile and I can just click the next button in the report viewer to see the other employee and when I Click print it will print all the employees information. Can you help me with this guys... Thank you in advance. By the way I am using vb.net and MySQL database for this project...

1

1 Answers

1
votes

In the created static parameter add one default value All.

if you want to select all then select that paramter and in record selection formula write below code.

if {?parameter} <> "ALL"
then table.employeeid = {?Parameter}
else table.employeeid=table.employeeid

Try like this

{view_dtr.dtr_date} in {?date_from} to {?date_to} and if {?emp_id} <> "ALL" then 
{view_dtr.employee_id} = tonumber({?emp_id} )
else 
{view_dtr.employee_id}={view_dtr.employee_id}