In Odoo 8, I want to print a qweb report and, in the moment of printing, I want to check if some field is missing. If so, I want to indicate that to the user through a popup window, otherwise the report would be directly printed.
what I am doing now is, once the report is called, the .xml file calls a method from the object that will do these checks and then raise an exception informing the user about the missing fields, but I do not want the traceback to be displayed, just my relevant information.
Does anyone have a suggestion about the better way to achieve that?
Thank you very much in advance.
Related
I developed a DB with MS Access 2013.
I want to printout one report which include 3 subreports (subrA, subrB, subrC) Sometimes #error appears in the PDF (on subrA). It is always on the same textbox.
What is weird is that I always display the report (as preview) and no error appears.
Then I launch PDF printing and sometimes (not always???) I get the error (after error happening in PDF, I sometimes have error in report preview).
My tests :
I tried to printout with PDFcreator and DoCmd.OutputTo, same issue happens
I tried to replace the subrA (expecting a corrupt report) but I still get the error.
I expand the textbox to be sure that it large enough according to the content,
If I print all the reports in one time, I never get this issue
It seems to be lack of refresh issue, as if Access do not have time (sometimes) to format the data in the subreport before printing.
Do you have any idea to support me or any idea of what happens ?
Thanks a lot.
Additional information (added the 2018/01/22)
All the data in SUBR_A come from a query. The data code in error is :
SomDom("QtyCalculeIngredient_UProd";"qryProduction_OFDetailsIngredients";"IdProduction=" & [IdProduction] & " AND Ordre<=" & [Ordre])
This call is perhaps to long to perform and this must explain why #error happens sometimes. Do you have any ideas to reduce the request time ?
A domain function (here DSum()) in the Details section can be problematic.
In your case it seems that you could easily replace that by using the RunningSum property, see:
https://support.office.com/en-us/article/summing-in-reports-ad4e310d-64e9-4699-8d33-b8ae9639fbf4#bmrunningsum
Thanks for the support. By the way, I was searching for a workaround on myself and I change the DSUM() by a RunningSum before our post your answer,
Of course, it works very well. Thanks for the tips !!!
I created a Shared Dataset in report builder 3.0 a week ago and stored in my "My Reports" folder on report server.I removed it the other day; however, when I go to create a new Dataset today...it's still listed as an option. When you attempt to select it from the list you receive an error message that it's no longer available. Below is the error which I am getting :
"The shared dataset cannot be loaded from the server".
Please help if anyone has faced a similar issue and know the reason for it. Thanks in Advance !!!
Ren is more or less correct, Report Builder is caching a list of items you've recently used. It does not bother to check if the items it's caching actually exist or not, which is why you're getting the error you do when you try to use one.
To clear the list, click the big icon in the top left (or alt + F), then click the Options button at the bottom of the dialog that appears.
In the options window you can clear your recent item lists, along with change some of the rules for how those are kept.
I don't believe there's any way to make Report Builder automatically remove broken/missing references
I have a very strange problem. I load my app, switch to the correct tab and then press the button I need to press. This runs a function and when I first load the page it may only provide part of the correct result. However if I wait a few seconds it produces the correct result in full. Any ideas why this might be happening?
Additional Information
The button simply checks through a list of objects returned via ScriptDB. Objects that are valid are displayed and objects that are in-valid are not. If the object appears again in updates the text to display how many have been found in the list (eg: the label would change from "Object A" to "Object A (2)").
It seems to me like it doesn't have the rest of the list somehow as it doesn't always stop at the same object. It's Very strange and not something I've experienced before. The other features of my app using ScriptDB work completely regardless of how quickly I use them.
I've figured it out now. I somehow had some erroneous data in the database which was returning a null field. I can only assume that this was from a import that I did last week from a spreadsheet.
This was copied from my comment to show that it has been resolved.
Got a weird problem. I was debugging some code for a form and everything was working as intended for the most part when suddenly I began to get a "Method or Data Member Not Found" for every event of my form. It's like my form suddenly does not recognize any of my controls or events. I have all of my methods properly closed and did not rename any controls.
Any ideas on what would be the root of "Method or Data Member Not Found" for every single control with an event?
Thanks
Importing into a fresh database as talbright suggested gave me more descriptive error messages.
A fresh import, compact&repair, and renaming of appropriate control fixed the problem from occuring. As Remou suggested, regular maintenance can help prevent these sorts of problems.
edit for future readers: This problem occurred while using a shared front end file. So don't do that if possible.
I've found that any MISSING: reference can make the simplest of code fail.
Check in the visual basic window
Menu Tools -> References
look down the checked refences to see if any are MISSING
I just fixed the same error by renaming text and combo boxes something not so close to a concatenated Table & Field string. Actually just prepended those names with "tbx" and "cbx".
I am working on an Access 2007 application that was created by someone else. It has a strange, intermittent bug in which it prompts the user for query parameters when the main form is opened. The query parameters are clearly not necessary, because the error does not always occur.
The very strange "fix" to this problem is to open and close a particular module before opening the main form. Then the form opens without parameter prompts. However, of course I can't ask end users to open and close modules.
I tried using a macro to open and close the module when the database is opened. That fixes the bug, but leaves the VBA code window open, so that's no good.
Has anyone run into anything like this before? Any suggested solutions, workarounds, debugging tips, etc?
If you use the "Database Documenter" feature and check "yes" to all the options, you will obtain an exhaustive report that should let you trap your problem parameter. Export this report as an .rtf or .pdf document, so it is searchable. Identify a keyword from the dialog prompt, and search on that.
Once you check the query objects using the Documenter, check your VBA code. You'll do this by stepping through code in the IDE. If the main form has subforms, they are opened with (within) the main form. And they load before the main form.
Identify those subforms.
Sprinkle
breakpoints in their code modules
(if you find a Load function, that
is highly relevant).
If the main form has a
code module, do the same there.
Have a look for global variables in the module that needs to be opened and closed or any variable that is referenced in the module belonging to the form.
Access displays the Enter Parameter Value dialog box when you open an object that contains an identifier or expression that Access cannot interpret. You need to determine the source object. Here's a step-by-step guide:
http://office.microsoft.com/en-us/access-help/why-does-access-want-me-to-enter-a-parameter-value-HA010274377.aspx