Login
Register
Search
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Forums
Performance Management
Lawson Business Intelligence/Reporting/Crystal
Crystal Report Issue
Home
Forums
Jobs
LawsonGuru
LawsonGuru Letter
LawsonGuru Blog
Worthwhile Reading
Infor Lawson News Feed
Store
Store FAQs
About
Who's On?
Membership:
Latest:
Chris Radcliffe
Past 24 Hours:
0
Prev. 24 Hours:
0
Overall:
5187
People Online:
Visitors:
342
Members:
0
Total:
342
Online Now:
New Topics
S3 Customization/Development
Cobol - Extract Current Time
4/24/2024 7:21 PM
How do you extract just the Current System Time in
Lawson Landmark
LPL INSTR Functions
4/5/2024 8:32 PM
I'm writing a simple report using the Create R
Infor SCM
Translating 856 to get the ~ REF^CN^ field
4/3/2024 8:24 PM
We are trying to get the tracking number which is
IPA/ProcessFlow
Sample XML file create Flow
4/3/2024 3:43 PM
Hello everyone, I am new to creating XML files
Lawson S3 HR/Payroll/Benefits
bn105 error message
3/26/2024 6:40 PM
I need to change some of the set ups in our Life I
IPA/ProcessFlow
IPA executing Job
3/13/2024 7:08 PM
New to the IPA world and was wondering, can an IPA
Lawson S3 HR/Payroll/Benefits
Life Age Reduction on benefits plans
3/12/2024 7:15 PM
For our optional life we have an age based coverag
Lawson S3 HR/Payroll/Benefits
BN53.1 Add-In
3/7/2024 3:31 PM
We are migrating to Solstice. They require a
Lawson Business Intelligence/Reporting/Crystal
Domain Name Change
3/5/2024 7:45 PM
Our domain name needs to change and was hoping I c
S3 Customization/Development
Cobol calling Shell Script
2/29/2024 1:27 PM
Has anyone created or modified a Lawson Cobol prog
Top Forum Posters
Name
Points
Greg Moeller
4184
David Williams
3349
JonA
3288
Kat V
2984
Woozy
1973
Jimmy Chiu
1883
Kwane McNeal
1437
Ragu Raghavan
1351
Roger French
1311
mark.cook
1244
Forums
Unanswered
Active Topics
Most Liked
Most Replies
Search Forums
Search
Advanced Search
Topics
Posts
Prev
Next
Forums
Lawson Business Intelligence/Reporting/Crystal
Crystal Report Issue
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Author
Messages
JeanneS
Veteran Member
Posts: 49
4/7/2010 1:07 AM
I have a crystal report that uses an union query to pull the actual and budget amounts from the GLAMOUNTS and FBDETAIL. The query lists the amounts all on the same row as shown below (12 debit fields and 12 credit fields).
FY AU Account debitperiod1 creditperiod1 debitperiod2 creditperiod2 debitperiod3 etc.
I want to list my data as shown below where the net amount is the total of the debit and credit for each period and the period is 1, 2, 3 etc:
FY AU Account Net Amount Period
I need to make a chart based on the data so I need one amount field and a field to identify the period.
Does anyone have any suggestions as to how to do this? I tried using an if else statement but it only lists the first period.
TracyO
Veteran Member
Posts: 97
4/7/2010 11:25 AM
Jeanne
Here is the formula we used to get the glamounts by period.
Hope this helps
if {?Fiscal Year} = {glamounts.fiscal_year} then
if {?Period} = 1 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01}
end if
if {?Period} = 2 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02}
end if
if {?Period} = 3 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03}
end if
if {?Period} = 4 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04}
end if
if {?Period} = 5 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05}
end if
if {?Period} = 6 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06}
end if
if {?Period} = 7 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07}
end if
if {?Period} = 8 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07} + {glamounts.db_amount_08} + {glamounts.cr_amount_08}
end if
if {?Period} = 9 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07} + {glamounts.db_amount_08} + {glamounts.cr_amount_08} + _
{glamounts.db_amount_09} + {glamounts.cr_amount_09}
end if
if {?Period} = 10 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07} + {glamounts.db_amount_08} + {glamounts.cr_amount_08} + _
{glamounts.db_amount_09} + {glamounts.cr_amount_09} + {glamounts.db_amount_10} + _
{glamounts.cr_amount_10}
end if
if {?Period} = 11 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07} + {glamounts.db_amount_08} + {glamounts.cr_amount_08} + _
{glamounts.db_amount_09} + {glamounts.cr_amount_09} + {glamounts.db_amount_10} + _
{glamounts.cr_amount_10} + {glamounts.db_amount_11} + {glamounts.cr_amount_11}
end if
if {?Period} = 12 then
formula = {glamounts.db_beg_bal} + {glamounts.cr_beg_bal} + {glamounts.db_amount_01} + _
{glamounts.cr_amount_01} + {glamounts.db_amount_02} + {glamounts.cr_amount_02} + _
{glamounts.db_amount_03} + {glamounts.cr_amount_03} + {glamounts.db_amount_04} + _
{glamounts.cr_amount_04} + {glamounts.db_amount_05} + {glamounts.cr_amount_05} + _
{glamounts.db_amount_06} + {glamounts.cr_amount_06} + {glamounts.db_amount_07} + _
{glamounts.cr_amount_07} + {glamounts.db_amount_08} + {glamounts.cr_amount_08} + _
{glamounts.db_amount_09} + {glamounts.cr_amount_09} + {glamounts.db_amount_10} + _
{glamounts.cr_amount_10} + {glamounts.db_amount_11} + {glamounts.cr_amount_11} + _
{glamounts.db_amount_12} + {glamounts.cr_amount_12}
end if
end if
Matthew Nye
Veteran Member
Posts: 514
4/7/2010 11:30 AM
Additionally, take a look at GLCONSOL and GLAMOUNTX tables. You may have to set some flags in your system in order to get them populated but if they meat your needs from a granular stand point it may save you some heartache.
hth
Matt
JeanneS
Veteran Member
Posts: 49
4/8/2010 10:23 AM
What is your formula for period? Thanks!
TracyO
Veteran Member
Posts: 97
4/8/2010 1:40 PM
In my formula {?Period} is just a prompted paramater field. You could probably use system period if that would work for your scenario.
Adam Jacobson
Veteran Member
Posts: 69
4/8/2010 1:54 PM
Here is a little more advanced formula:
numbervar array CR_amounts :=
[{GLAMOUNTS.CR_AMOUNT_01},{GLAMOUNTS.CR_AMOUNT_02},{GLAMOUNTS.CR_AMOUNT_03},
{GLAMOUNTS.CR_AMOUNT_04}, {GLAMOUNTS.CR_AMOUNT_05},{GLAMOUNTS.CR_AMOUNT_06},
{GLAMOUNTS.CR_AMOUNT_07}, {GLAMOUNTS.CR_AMOUNT_08},{GLAMOUNTS.CR_AMOUNT_09},
{GLAMOUNTS.CR_AMOUNT_10}, {GLAMOUNTS.CR_AMOUNT_11},{GLAMOUNTS.CR_AMOUNT_12}];
numbervar array db_amounts :=
[{GLAMOUNTS.DB_AMOUNT_01},{GLAMOUNTS.DB_AMOUNT_02},{GLAMOUNTS.DB_AMOUNT_03},
{GLAMOUNTS.DB_AMOUNT_04}, {GLAMOUNTS.DB_AMOUNT_05},{GLAMOUNTS.DB_AMOUNT_06},
{GLAMOUNTS.DB_AMOUNT_07}, {GLAMOUNTS.DB_AMOUNT_08},{GLAMOUNTS.DB_AMOUNT_09},
{GLAMOUNTS.DB_AMOUNT_10}, {GLAMOUNTS.DB_AMOUNT_11},{GLAMOUNTS.DB_AMOUNT_12}];
numbervar period;
numbervar totalamt;
// only calculate if the fiscal year is the starting fiscal year
//if {GLAMOUNTS.FISCAL_YEAR} = {?Starting Fiscal Year}
// then
period := 1;
totalamt := {GLAMOUNTS.CR_BEG_BAL}+{GLAMOUNTS.DB_BEG_BAL};
while period < {?Thru Period} do
(totalamt := totalamt + cr_amounts[period] + db_amounts[period];
period := period + 1;
);
;
numbervar AccountTotal := totalamt;
AccountTotal;
This formula calculates year to date. But it could be easily modified to do a period range (load period with starting period parameter and then continue to an ending period)
JeanneS
Veteran Member
Posts: 49
4/11/2010 12:14 AM
Could you please elaborate on how the period is being used with the formulas listed as the GLAMOUNTS table does not have a period field. Are you creating a formula to create a period field?
You are not authorized to post a reply.