Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report suggestion 1

Status
Not open for further replies.

livingston

Programmer
Aug 22, 2000
1
US
Hello, I never used Crystal Reports before so please any suggestions are welcome. I'll try to make it as simple as possible.

I have a Sybase table where transaction IDs, and expense codes are kept. I have to create a report displaying the transaction ID's and expense code. For each transaction $25 dollars should be added to a corresponding expense code. I then have to show the totals for all expense codes. EXAMPLE: I have 5 transaction IDs and 3 expense codes.

Transaction ID Expense Code
1 A
2 B
3 A
4 B
5 C

So I have to desplay the total of $50 for A, $50 for B and
$25 for C.

Thanks


 
If you only have a small and fixed number of expense codes then the following approach might be suitable.

1)Create a 'Running Total' field for each expencse code, eg. {A_tot}, {B_tot} etc. Each running total should COUNT the {Expense_code} and have a formula for the specific code.

eg. {A_TOT} would COUNT {Expense_code} and have an Evaluate formula: {Expense_code} = "A".

2)Create a 'Formula' field for each running total field. Eg {A_val}, {B_val} etc. Each formula would be in the form:

25 * {A_TOT}

Place all the formulas in the Report Footer.
The result should be a count of each expense code and the dollars charged to each code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top