I need help in making a report which may have been missing something

Hi,
I’m making a report in which I have to show sales, expenses and balance. Which I must see differently from every user. I’ve tried to make it usable but I couldn’t do that. Experts are requested to correct the error in my report.

My designed reports is given below with code.

Capture

[User Sale Total:2, 1]
>User|Sales
{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum}
>>Total|[=F(TN('{REPORT PAYMENT DETAILS:P.Amount.Sum}'))]


[Expenses:1, 1]
>User|Amount
{REPORT ACCOUNT TRANSACTION DETAILS:T.UserName,T.Amount.sum:(ATT=Expenses Transaction)}
>Expenses Total|{ACCOUNT DEBIT TOTAL:Expenses}


[Sale, Expenses & Balance Report By User:2,2, 1]
@Administrator,Admin
>User:|$1
Sale||Rs. {REPORT PAYMENT TOTAL:(TU=$1)}
Expenses||{ACCOUNT TRANSACTION DEBIT TOTAL:Expenses Transaction:(TU=$1)}
Balance||[=F(TN('{REPORT PAYMENT TOTAL:(TU=$1)}')-TN('{ACCOUNT TRANSACTION DEBIT TOTAL:Expenses Transaction:(TU=$1)}'))]

Required report should be like this.

Looks like your using TU which I beleive to be ticket user as a constraint on account transaction report expression.
If that’s correct guessing you creating account transactions outside of a ticket?

1 Like

In fact, I want to make a report In which I need user transaction details. How much he has sale and how many expenses and payments are paid from sale amount and finally the balance will be known eventually.

After a lot of research in the forum, I have prepared this report. I don’t know much about Samba. I posted to help. Please correct my report. I am thankful to you.

I dont know the answer, I personally doubt the account transaction report incorporates the TU constraint hence showing total.
If your reporting per user would you not have a subset of accounts for each user?

There is a way to filter account transactions by user. (AUN=username)

TU won’t work.

So try (AUN=$1)

You must have latest sambapos.

1 Like

Sir I try but the cannot get result as expected.

code is

[User Sale Total:2, 1]
>User|Sales
{REPORT PAYMENT DETAILS:P.User,P.Amount.Sum}
>>Total|[=F(TN('{REPORT PAYMENT DETAILS:P.Amount.Sum}'))]


[Expenses:1, 1]
>User|Amount
{REPORT ACCOUNT TRANSACTION DETAILS:T.UserName,T.Amount.sum:(ATT=Expenses Transaction)}
>Expenses Total|{ACCOUNT DEBIT TOTAL:Expenses}


[Sale By User:2,2, 1]
@Administrator,Admin
>User:|$1
Sale||Rs. {REPORT PAYMENT TOTAL:(TU=$1)}
Expenses||{ACCOUNT TRANSACTION DEBIT TOTAL:Expenses Transaction:(AUN=$1)}
Balance||[=F(TN('{REPORT PAYMENT TOTAL:(TU=$1)}')-TN('{ACCOUNT TRANSACTION DEBIT TOTAL:Expenses Transaction:(AUN=$1)}'))]

result is

Capture

Might be wrong but don’t think this expression supports constraints, you specify the account and get total debt.

Maybe look to use the expression in Expenses section since that’s returning numbers you expect.

1 Like

Also what version of SambaPOS are you on?

It looks like its returning correct data to me. What is wrong with it?

Oh i see whats wrong, You are using the wrong tag for the bottom section.

like JTR said try this instead
{REPORT ACCOUNT TRANSACTION DETAILS:T.Amount.sum:(ATT=Expenses Transaction) and (AUN=$1)}

1 Like

oh great its working thanks sir. thanks so a lot sir. :smiley:

1 Like