VB6 & Crystal Reports 8.0 - TechRepublic
General discussion
October 22, 2001 at 01:51 PM
paulfr2

VB6 & Crystal Reports 8.0

by paulfr2 . Updated 24 years, 8 months ago

Ok first off, I’m a newbie to programming so please bear with me. My company has asked me to design a time tracking application for all of their technicians. Ok, that’s fine I can do that. ADO is easy, but the problem is creating a dynamic reportusing Crystal Reports 8.0. We want to be able to select a specific technician from a list and a date range. I’ve been using SQL statements to generate the query from a Combo Box and 2 Text field boxes.

The code that I use in the SQL statement is as follows:

sSql = “SELECT tblLabor.Technician, tblLabor.Date, tblLabor.[Billable Hours], tblLabor.[Non Billable Hours], tblLabor.Vacation, tblLabor.[Sick Time], tblLabor.[Project Time], tblLabor.[Total Time], tblLabor.TicketNumber, tblLabor.TimeTaken ”
sSql = sSql & “FROM tblLabor ”
sSql = sSql & “WHERE tblLabor.Technician = ‘” & cmbTechname.Text & “‘ AND tblLabor.Date >= ‘” & txtDateStart.Text & “‘ AND tblLabor.Date <= '" & txtDateEnd.Text & " ' " sSql = sSql & "ORDER BY tblLabor.Technician" the sSql statment is piped into a text file for right now, but the company wants to use Crystal Reports to generate a more professional looking report. I'm somewhat familiar with CR, but not that familiar and can't seem to find any resources on how to use it with VB. Any assistance would be greatly appreciated. Thanks, Paul Friedrichsmeyer

This discussion is locked

All Comments