Solved Field Error in Report (1 Viewer)

asteropi

Member
Local time
Today, 12:36
Joined
Jun 2, 2024
Messages
90
I have 3 reports printing for wholesale and retail customers
When printing for wholesale everything is fine

When printng for customers however, the OrderSum field (using a Dsum command) shows an error, even though the individual costs are all calculated correctly. In the relevant form it shows up just fine, it's the report that get's the error

I can only imagine that the problem is because the retail price is coming from a calculation and not a direct input
I input my wholesale prices directly without VAT in the table
However for retail, I input the final price and then I have another field where it removes the VAT with a calculation.
Then in the OrderQ I have a Price field that runs an IF command that basically says if customer is Wholesale, get wholesale price, but if customer is retail get the retail-no-vat-calculated price
But since the form is fine, I don't know wy it's not working in the report. I used the exact same command. Help!
 
Why do it differently when you are getting the same no VAT value?
 
Because I can't calculate all the retail prices without the VAT. They have to show as they are in their total

When I input a new product I give it a wholesale-no-vat price and a total-retail-price, as it is in the website
 
I tried doing the calculation in the query but then I get another stupid error

So in he query I created a calculated field and had my price draw the if from that field. The single product calculations work fine but the Sum field gets a Name? error
Mind you I haven't changed anything else
 
Without a file it is difficult to verify where the problem originates from, if you can post it you must also indicate the form, query and report involved.
 
You want the OrdersF,
OrderInvoiceR/QuotationR/ReceiptR (they are basically the same)
OrderDetailsQ
 

Attachments

Last edited:
Anyway, I just used a =Forms! command to just reference the form instead of recalculating and it worked fine now

But what you said is SO WEIRD!
I have tried all three reports but everything is fine.
 
If you have AnyDesk, you can download it, then launch it and make the request to 1234900763 and I'll show you that it works for me.
 
Download AnyDesk, which requires no installation and is only 5.4 MB in size.
 
If it is solved, please explain how it has been solved.
It might help others in the future.? After all that is what these forums are for?
 
I tried OrderInvoiceR with record 4 on the form.
That opened fine, no complaints, but it is all Greek to me (pun intended)
I could not make head or tail of the figures either TBH. :(
 
I will toss in a bit of advice for future questions. It took us until the 4th post to learn that this was a Name? error - which usually means there is something spelled incorrectly or qualified (by location) incorrectly. If you have a problem, don't forget to include the exact error as part of your original question. This is not a criticism because about half of the members in the forum have done this. For diagnostic purposes, though, you would do best to tell us all of the symptoms up front.
 
If it is solved, please explain how it has been solved.
It might help others in the future.? After all that is what these forums are for?
I’m sorry it was like 6am and my laptop run out of juice so I went to bed.

There are two ways to solve it:
1) instead of the Dsum, just run a Sum(ProductCost) in the report on the ProductSum field. @CarlettoFed helped me figure this one out

2) instead of running a calculation I just added a =Forms![OrderF]![ProductSum] command and it worked just fine. It just grabs the result straight from the form and doesn’t need to run any calculations


I will toss in a bit of advice for future questions. It took us until the 4th post to learn that this was a Name? error - which usually means there is something spelled incorrectly or qualified (by location) incorrectly. If you have a problem, don't forget to include the exact error as part of your original question. This is not a criticism because about half of the members in the forum have done this. For diagnostic purposes, though, you would do best to tell us all of the symptoms up front.
No the original wasn't a name error. The original problem was an Error! error.
If you read carefully you would see that I tried a solution (to do the calculation in the report query) with my limited knowledge and the Error! changed to Name?
So I deleted that -obviously non-solution and went back to start
 
Last edited:
I tried OrderInvoiceR with record 4 on the form.
That opened fine, no complaints, but it is all Greek to me (pun intended)
I could not make head or tail of the figures either TBH. :(
I tried my file with @CarlettoFed and orders 1-2-3 were working fine, but #4 was giving him an error like me.
The report opens fine but the ProductSum returns an Error! error.
So I don't know how you mean that.
 
Last edited:
1726044636192.png
 

Users who are viewing this thread

Back
Top Bottom