Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Crystal Reports Push Method - Missing Data Post Reply Post New Topic
Author Message
pgeorge33
Newbie
Newbie


Joined: 04 Dec 2012
Online Status: Offline
Posts: 8
Quote pgeorge33 Replybullet Topic: Crystal Reports Push Method - Missing Data
    Posted: 06 Dec 2012 at 1:25am
I am trying to utilize the "push method" to pass a data set to a crystal report and create reports. The application is for a Time and Attendance product I am working on. The reason I have chosen this method is because the user has the option of selecting several variables that they wish to report on including Employee Numbers, Departments, Date window, Special Codes, etc.

I have the SELECT statement working fine and it is returning the data I want to report on, but I can't seem to figure out how to get it to display the data correctly.

I am using Visual Studio 2008 with an Access database and writing the code in C#.net.

I generated a DataSet File in VS2008 with the tables I need and then in CR I used the Database Expert to select that Data Source to get the tables & fields I want to report on.

When I run the report, I get the proper number of lines of data, but some of the fields do not show up in the report output, even though they are in the data set I pass to the report.

In the report I am working with now, the "main" table is my "Cards" table. All of the data I selected from this table show up. However, the data that is from other tables, the "employee" table and the "rules" table is not showing up in the report. I have tried every combination in the Database Expert / Link tab for linking the tables, but I have not been able to find the right combination.

Many of the link combinations give me just the "cards' table data. Some of them don't give me any data, but none of them I have tried give me all of the data I need to show.

Here is the SELECT statement I am using in my program to pull the data from the database:

SELECT Cards.[Employee Number], Employee.[Last Name], Employee.[First Name], Employee.[Badge Number], Employee.Department, Cards.Date, Rules.[Start Time], Rules.[Stop Time], Cards.RuleofPay, Cards.Notes FROM ((Cards LEFT JOIN Rules ON (Cards.RuleofPay = Rules.[Rule Name]) AND (Cards.[Company ID] = Rules.[Company ID])) LEFT JOIN Employee ON (Cards.[Employee Number] = Employee.[Employee Number]) AND (Cards.[Company ID] = Employee.[Company ID])) LEFT JOIN Company ON Cards.[Company ID] = Company.[Company ID] WHERE ((((((Cards.Date) >= #2012-11-21#) AND ((Cards.Date) <= #2012-11-23#)) AND ((Cards.[Company ID])= 100 )AND (((Cards.[Employee Number]) = '0000001113') OR ((Cards.[Employee Number]) = '0000001153') OR ((Cards.[Employee Number]) = '0000001182')))AND ((Employee.Classification) = 'Full Time' Or (Employee.Classification)= 'Part Time')) AND (Cards.[Special Code]) = 'Absent')

Any ideas on what is causing my problem here?
Peter
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.