Crystal Report Design

fie

Member
Joined
Aug 30, 2005
Messages
22
Programming Experience
1-3
Please i am new to crystal report design. I need your help

I have designed a crystal report from VB.Net that has series of columns (fields) generated from the following two tables.

1. tblAgt - Table

fconsole numeric

fagent


2. tblDebit - Table
fmending Date field

AccountNo

fagent

ftrans

fgrossprem

Comm

The report has the following format





Date: 01/01/2004 To 31/12/2004

Account No: 38000 To 38092



Balance bf: 00.00

fmending AccountNo Fagent ftrans fgrossprem Comm. Net Amt

02/02/04 38837 db001 DR 5,000.00 350.00 4,650.00

02/07/04 38838 db002 CR 15,000.30 200.00 15,200.00

03/02/02 29388 db003 pyt 2,000.00 100.00 1,900.00



The Date and the Accounts Group header were generated with the parameter fields

The balance column is where I am having a problem with because it is suppose to be generated from a summary of all fgrossprem that falls within a range of date below 01/01/2004 (startdate)

ie. fmending < startdate

where startdate and enddate were generated with parameter fields



And the total fgrossprem in table (tbldebitold) is added to fconsole in table (tblagt) ie

Balance bf = fgrossprem + fconsole



I am trying to filter for all the dates that is less than startdate and to get the accumulated fgrossprem but have always got 0.00 as my result.



I would be greatful if you could put me through.



Thanks



fie
 
Pleeeeeeeeeease I need your help greatly and would appreciate your kind assistance.

1. tblAgt - Table
fconsole numeric
fagent

2. tblDebit - Table
fmending Date field
AccountNo
fagent
ftrans
fgrossprem
Comm

The report format is as follows:
Date: 01/01/2004 To 31/12/2004
Account No: 38000 To 38092
Balance bf: 00.00
fmending AccountNo Fagent ftrans fgrossprem Comm. Net Amt
02/02/04 38837 db001 DR 5,000.00 350.00 4,650
02/07/04 38838 db002 CR 15,000.30 200.00 15,200.00
03/02/02 29388 db003 pyt 2,000.00 100.00 1,900.00


The Date and the Accounts Group header were generated with the parameter fields The balance column is where I am having a problem with because it is suppose to be generated from a summary of all fgrossprem that falls within a range of date below 01/01/2004 (startdate)
ie. fmending < startdate
where startdate and enddate were generated with parameter fields. And the total fgrossprem in table (tbldebitold) is added to fconsole in table (tblagt) ie

Balance bf = fgrossprem + fconsole


I am trying to filter for all the dates that is less than startdate and to get the accumulated fgrossprem but have always got 0.00 as my result.

I would be greatful if you could put me through.

Thanks

fie
 
Variables

If you are not seting your record selection to records between the 2 dates you need to set up a variable on the detail line that keeps a running total if the date falls between the 2 dates provided.

create a formula field called GrossPerm - edit the formula

in crystal syntax:

WhilePrintingRecords;
Currencyrvar GrossPerm;
if {tblDebit.fmending} < {@startdate} then
GrossPerm := GrossPerm + {tblDebit.fgrossprem};

stick this formula field on the detail line and see if it keeps a running total for you.
 
Crystal Report design

Please find attached a sample copy of what I am trying to talk about

The detail line falls within the range of @startdate and @Enddate range and the Balance bf is positioned at the Account Number Grouping line.

I tried editing the Balance bf field as follows:

WhilePrintingRecords;
Currencyvar Balance_bf;
if {tblDebitold.fmending} < {@startdate} then
Balance_bf := Balance_bf + {tbldebitold.FGRSSPRM}


I got $0.00 which is wrong.

you may wish to see the attached document for to have a better understanding of what I am trying to explain.
 
Startdate

If the detail line is set between the start and end dates you will never get a record with a date < the startdate and the Balance_bf will always be 0.00. Not clear how you are selecting your records, or how you are trying to get the Balance_bf. Keep posting, it is something simple, we'll get it working today...
 
Hi Dav,
Thanks for your response. I guess you have seen my report. I am attaching the report design features, may be that would throw more light.

Thanks

Fie
 
Back
Top