i have two MySQL tables with the following structures
CREATE TABLE tbldepartments (
departmentID TINYINT( 2 ) UNSIGNED NOT NULL AUTO_INCREMENT,
department VARCHAR( 20 ) UNIQUE NOT NULL,
PRIMARY KEY ( departmentID )
)
and
CREATE TABLE tblemployees (
employeeID SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT,
departmentID TINYINT( 2 ) UNSIGNED NOT NULL,
firstName VARCHAR( 20 ) NOT NULL,
lastName VARCHAR( 20 ) NOT NULL,
dateHired DATE NOT NULL,
salary FLOAT UNSIGNED NOT NULL,
FOREIGN KEY ( departmentID ) REFERENCES tbldepartments ( departmentID ),
PRIMARY KEY ( employeeID )
)
i want to create a report using Crystal Reports in Visual Basic 2010. the query for the report is
SELECT CONCAT( e.firstName, ' ', e.lastName ) AS Employee, d.department AS Department,
e.salary As Salary, e.dateHired as DateEmployeed FROM tblemployees e, tbldepartments d
WHERE e.departmentID = d.departmentID