M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 12, 2021 #1 i have query as PIC Attached i need to put Expression in report text to allow me to get one value = sum CreditPL Column - Sum DebitPL Column = 1,108,530.52 - 461,769.16 will appear finally 646,761 Attachments sumdebitplminus sumcreditpl.PNG 59.7 KB · Views: 259
i have query as PIC Attached i need to put Expression in report text to allow me to get one value = sum CreditPL Column - Sum DebitPL Column = 1,108,530.52 - 461,769.16 will appear finally 646,761
oleronesoftwares Passionate Learner Local time Today, 15:42 Joined Sep 22, 2014 Messages 1,160 Dec 12, 2021 #2 First, create the query in design view and save the query Second, create a report using the report wizard and making the query the record source. Look at the attachments and follow the steps. Attachments report final output .PNG 8.5 KB · Views: 241 reportwizard8.PNG 8.5 KB · Views: 236 reportwizard7.PNG 28.5 KB · Views: 240 reportwizard6.PNG 42.8 KB · Views: 234 reportwizard5.PNG 16.4 KB · Views: 191 reportwizard4.PNG 28.2 KB · Views: 242 reportwizard3.PNG 34.2 KB · Views: 228 report wizard2.PNG 31 KB · Views: 229 report wizard1.PNG 25.1 KB · Views: 222 querybaldesign.PNG 14.8 KB · Views: 235
First, create the query in design view and save the query Second, create a report using the report wizard and making the query the record source. Look at the attachments and follow the steps.
strive4peace AWF VIP Local time Today, 17:42 Joined Apr 3, 2020 Messages 1,048 Dec 12, 2021 #3 it's not necessary to put the calculation in a query if you're going to use a report -- you can though. In either a group or report header or footer, you can use an expression like this in a textbox: = Sum(CreditPL_fieldname) - Sum(DebitPL_fieldname)
it's not necessary to put the calculation in a query if you're going to use a report -- you can though. In either a group or report header or footer, you can use an expression like this in a textbox: = Sum(CreditPL_fieldname) - Sum(DebitPL_fieldname)
M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 12, 2021 #4 oleronesoftwares said: First, create the query in design view and save the query Second, create a report using the report wizard and making the query the record source. Look at the attachments and follow the steps. Click to expand... i am so grateful for what you do thanks alot but i need the only expression final result = sum CreditPL Column - Sum DebitPL Column = 1,108,530.52 - 461,769.16 will appear finally 646,761 in text box how to get NZ(SUMCreditPL)-NZ(SUMDebitPL) BUT it does not work
oleronesoftwares said: First, create the query in design view and save the query Second, create a report using the report wizard and making the query the record source. Look at the attachments and follow the steps. Click to expand... i am so grateful for what you do thanks alot but i need the only expression final result = sum CreditPL Column - Sum DebitPL Column = 1,108,530.52 - 461,769.16 will appear finally 646,761 in text box how to get NZ(SUMCreditPL)-NZ(SUMDebitPL) BUT it does not work
oleronesoftwares Passionate Learner Local time Today, 15:42 Joined Sep 22, 2014 Messages 1,160 Dec 12, 2021 #5 mhakim said: NZ(SUMCreditPL)-NZ(SUMDebitPL) Click to expand... Put this instead NZ(Sum([credit]-[debit])) my column names are credit and debit You are putting the sum function wrongly
mhakim said: NZ(SUMCreditPL)-NZ(SUMDebitPL) Click to expand... Put this instead NZ(Sum([credit]-[debit])) my column names are credit and debit You are putting the sum function wrongly
M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 13, 2021 #6 oleronesoftwares said: Put this instead NZ(Sum([credit]-[debit])) my column names are credit and debit You are putting the sum function wrongly Click to expand... Thanks for your effort really appreciated =Nz(Sum([IncomeStatement-T]![CreditPL]-[IncomeStatement-T]![DebitPL])) I PUT THIS GIVE ME Error [IncomeStatement-T] is the Query contain the two columns [CreditPL] and [DebitPL]
oleronesoftwares said: Put this instead NZ(Sum([credit]-[debit])) my column names are credit and debit You are putting the sum function wrongly Click to expand... Thanks for your effort really appreciated =Nz(Sum([IncomeStatement-T]![CreditPL]-[IncomeStatement-T]![DebitPL])) I PUT THIS GIVE ME Error [IncomeStatement-T] is the Query contain the two columns [CreditPL] and [DebitPL]
oleronesoftwares Passionate Learner Local time Today, 15:42 Joined Sep 22, 2014 Messages 1,160 Dec 13, 2021 #7 mhakim said: [IncomeStatement-T] is the Query contain the two columns [CreditPL] and [DebitPL] Click to expand... what is the name of the two columns, i.e for debit and credit. Can u share a screenshot of the design view of your query?
mhakim said: [IncomeStatement-T] is the Query contain the two columns [CreditPL] and [DebitPL] Click to expand... what is the name of the two columns, i.e for debit and credit. Can u share a screenshot of the design view of your query?
M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 13, 2021 #8 oleronesoftwares said: what is the name of the two columns, i.e for debit and credit. Can u share a screenshot of the design view of your query? Click to expand... Attached Design and also final view Attachments query design.PNG 24.5 KB · Views: 225 sumdebitplminus sumcreditpl.PNG 59.7 KB · Views: 239
oleronesoftwares said: what is the name of the two columns, i.e for debit and credit. Can u share a screenshot of the design view of your query? Click to expand... Attached Design and also final view
oleronesoftwares Passionate Learner Local time Today, 15:42 Joined Sep 22, 2014 Messages 1,160 Dec 13, 2021 #9 mhakim said: =Nz(Sum([IncomeStatement-T]![CreditPL]-[IncomeStatement-T]![DebitPL])) Click to expand... Your columns are Tcredit and Tdebit, but you are using CreditPL and DebitPL. CreditPL and DebitPL are alias similar to using expr1, they are not column names. Change CreditPL to Tcredit and do same for DebitPL Also where does Income statement come in, is it a table name, it looks more like a query name?
mhakim said: =Nz(Sum([IncomeStatement-T]![CreditPL]-[IncomeStatement-T]![DebitPL])) Click to expand... Your columns are Tcredit and Tdebit, but you are using CreditPL and DebitPL. CreditPL and DebitPL are alias similar to using expr1, they are not column names. Change CreditPL to Tcredit and do same for DebitPL Also where does Income statement come in, is it a table name, it looks more like a query name?
M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 13, 2021 #10 So you say that i can not make any Expressions in reports on the query columns because all values on Reports are coming from queries i think there is a solution that we donot have
So you say that i can not make any Expressions in reports on the query columns because all values on Reports are coming from queries i think there is a solution that we donot have
M mhakim Member Local time Tomorrow, 01:42 Joined Jan 25, 2021 Messages 72 Dec 13, 2021 #11 i find the solution =Nz(DSum("[CreditPL]","IncomeStatement-T","Sequence2 Like '4*'"),0) -Nz(DSum("[DebitPL]","IncomeStatement-T","Sequence2 Like '5*'"),0)
i find the solution =Nz(DSum("[CreditPL]","IncomeStatement-T","Sequence2 Like '4*'"),0) -Nz(DSum("[DebitPL]","IncomeStatement-T","Sequence2 Like '5*'"),0)