Running Report on a Very large records

I have created a report that is running when the no. of records in the table was small i.e 100,000 plus. But now i have imported records in that table and the no. of records in the table now is 1million plus, but when i run the same report again, it does not display. It keeps searching through the entire table and start again and search. This is what it does and it will not display anything. The primary keys for the said table is entry no and employee no.

What do you people thing is wrong. What should i do for this report to run and display results fast? I need you assistants

Thanks.

This is a very theoretical answer. Try to check your filters done by your report, and then create Indexes to help filtering faster.

OBJECT Report 75022 Employee Profile
{
OBJECT-PROPERTIES
{
Date=30/01/08;
Time=23:23:36;
Modified=Yes;
Version List=SSMS1.5.4;
}
PROPERTIES
{
OnPreReport=BEGIN
IF (Empid = ‘’)
THEN ERROR(EmpidNull);
//IF (FromDate = 0D) OR (ToDate = 0D) THEN
// ERROR(DateBlank);
//IF (FromDate > ToDate) THEN
// ERROR(DateError);

//IF (BenefitsPayable = 0.00)
//THEN MESSAGE(bepaynull);

CompanyInfo.GET;
CompanyInfo.CALCFIELDS(Picture);
END;

Orientation=Portrait;
}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table2000000007;
DataItemTableView=SORTING(Period Type,Period Start);
OnAfterGetRecord=BEGIN
// Get Name
Employee.GET(Empid);
EmployeeName := Employee.“First Name” + Space + Employee.“Middle Name” + Space + Employee.“Last Name”;
BirthDate := Employee.“Birth Date”;
EVALUATE(NewBirthDate,BirthDate);
RetireDate1 := CALCDATE(’<60Y>’,NewBirthDate);
RetireDate := FORMAT(RetireDate1,0,’//’);
AdmissionDate := Employee.“Admission Date”;
EmployerCode := Employee.“Employer No.”;
Address := Employee.Address + Employee.“Address 2”;
Customer.GET(EmployerCode);
EmployerName := Customer.Name;

//Code added by akjallow to Display Dates within the range of
//the specified dates on the request form.
Date.RESET;
//Date.SETRANGE(“Period Type”,Calendar.“Period Type”::Month);
// Date.SETRANGE(“Period Start”,StartDate,FinalDate);
// DisplayMonth := FORMAT(“Period Start”,0,’, ');

// Code added by akjallow to Get contributions amount if date exists.
Cont.SETRANGE(“From Date”,Date.“Period Start”);
Cont.SETRANGE(“Employee No.”,Empid);
Cont.SETFILTER(“Fund Type”,’%1’,‘NPF’);
IF Cont.FIND(’-’) THEN BEGIN
MonthContAmount := Cont.Quantity;

IF Cont.COUNT > 0 THEN
Months := Months + 1;

IF Cont.NEXT <> 0 THEN BEGIN
MonthContAmount := MonthContAmount + Cont.Quantity;
END;
END ELSE BEGIN
MonthContAmount := 0.00;
END;

// Code added by akjallow to skip year “0000”.
IF FORMAT(“Period Start”,0,’’) = ‘0000’
THEN CurrReport.SKIP;
END;

}
SECTIONS
{
{ PROPERTIES
{
SectionType=Header;
SectionWidth=19800;
SectionHeight=10575;
}
CONTROLS
{
{ 1000000003;TextBox;300 ;423 ;1800 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=TODAY }
{ 1000000004;PictureBox;3900;0 ;8550 ;3384 ;Border=Yes;
SourceExpr=CompanyInfo.Picture }
{ 1000000005;Label ;3900 ;3807 ;8250 ;423 ;HorzAlign=Center;
VertAlign=Center;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=SOCIAL SECURITY AND HOUSING FINANCE CORPORATION }
{ 1000000006;Label ;4500 ;4230 ;5850 ;423 ;HorzAlign=Center;
VertAlign=Center;
FontSize=8;
FontBold=Yes;
MultiLine=Yes;
CaptionML=ENU=NATIONAL PROVIDENT FUND SCHEME }
{ 1000000007;Label ;4500 ;4653 ;6450 ;423 ;HorzAlign=Center;
FontSize=8;
FontBold=Yes;
CaptionML=ENU=EMPLOYEE MEMBERSHIP PROFILE }
{ 1000000008;Label ;0 ;5922 ;4050 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=SOCIAL SECURITY NUMBER: }
{ 1000000009;Label ;7800 ;5922 ;3300 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=CURRENT EMPLOYER: }
{ 1000000010;TextBox;4050 ;5922 ;2550 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr=Empid }
{ 1000000011;Label ;0 ;6768 ;2550 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=EMPLOYEE NAME: }
{ 1000000012;TextBox;2700 ;6768 ;4200 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr=EmployeeName }
{ 1000000013;Label ;0 ;7614 ;3450 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=DATE OF BIRTH : }
{ 1000000014;TextBox;3750 ;7614 ;2100 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr=BirthDate }
{ 1000000016;Label ;0 ;8460 ;3450 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=DATE OF ADMISSION : }
{ 1000000033;TextBox;3750 ;8460 ;2100 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr=AdmissionDate }
{ 1000000034;Label ;0 ;9306 ;3450 ;423 ;FontSize=8;
FontBold=Yes;
CaptionML=ENU=DATE OF RETIREMENT: }
{ 1000000035;TextBox;3750 ;9306 ;2100 ;423 ;HorzAlign=Left;
FontSize=8;
FontBold=Yes;
SourceExpr=RetireDate }
{ 1000000036;TextBox;11100;5922 ;8250 ;423 ;FontSize=8;
FontBold=Yes;
SourceExpr=EmployerName }
{ 1000000038;Label ;0 ;10152;11100;423 ;Visible=No }
}
}
{ PROPERTIES
{
SectionType=Body;
SectionWidth=19800;
SectionHeight=846;
}
CONTROLS
{
{ 1000000001;TextBox;0 ;0 ;5250 ;423 ;HorzAlign=Left;
VertAlign=Bottom;
FontSize=10;
FontBold=Yes;
SourceExpr=DisplayMonth }
{ 1000000002;TextBox;6450 ;0 ;4350 ;423 ;HorzAlign=Right;
VertAlign=Bottom;
FontSize=10;
FontBold=Yes;
SourceExpr=MonthContAmount }
}
}
{ PROPERTIES
{
SectionType=Footer;
&nb