how can a report be run if it can't be complied

Helo! Currently i’m working on some reports and on one of them i encountered a strange problem … report is working however when i go in design mode and try to compile it, it doesn’t want to. I figured out that the problem is in the following line: DtldCustLedgEntry.SETRANGE(“Customer No.”,Customer.“No.”); … Customer … it’s not a variable so it can’t be addressed the way it is. Now what i did was: DtldCustLedgEntry.SETRANGE(“Customer No.”,“Customer No.”); However if i correct it this way i can compile it but it doesn’t work properly any more. How could anyone who had made this report make it run without compiling it? thnx for all the answers lp prosen

Hello, a report cannot be run without compiling it! Customer.“no.” is not the same als “Customer no.”. Customer has to be declared als global or local var. Hope this helps. Ciau Sven

“Customer” is a table, so you have to declare it as global or local. If you do so the report will filter the contents of table “DtldCustLedgEntry”, field “Customer No.” with the contents of table “Customer”, field “No.” (in your first example). In your second example you filter table “DtldCustLedgEntry”, field “Customer No.” with the contents of the current record (which may be the same table) and field “Customer No.”. May guess is you didn’t select the correct record from table “Customer”. Hence you don’t get a correct result.

Hi, I had the same problem with a 3.6 report that I imported in a 3.10 database. The report was working, but it was linking to objects not in the 3.10 version, so it was impossible to compile the modifications. So, it is possible that your report runs even if there is some impossible references in it. However, you have to make sure to remove any errors en recompile it if you want to have good results.

A report CAN be run no matter if it’s having compiling errors. How? It’s easy. Sometimes you’re having a report that’s properly working and compiling. That report is having references to tables/records that are at the end not used on the report on running but are refered. After a while, somebody makes changes on tables on the database and remove one of the refered fields that’s on the report but not used for anything. The report (as it’s still compiled), works perfectly, but if you try compiling it again it will give you an error. Regards,

quote:


Originally posted by lordslayer
DtldCustLedgEntry.SETRANGE(“Customer No.”,Customer.“No.”); … Customer … it’s not a variable so it can’t be addressed the way it is. Now what i did was: DtldCustLedgEntry.SETRANGE(“Customer No.”,“Customer No.”);


Are you sure that Customer.“No.” is not a variable?? did you check what dataitems were used also? Something that sometimes happens also is on custom changes when you’re working on a database and you use certain fields/tables that are not standard and you move the object to a different database where the same numbers are used for totally different fields/tables, editing the report can show really “funny” things…