Hi i want to run a form from within a report. I am using the report to import the data from an excel sheet. Once the data is imported into navision table, i want to show the imported data in a form to the user for his approval. for this i put the following code in onpostreport trigger:
form.run([formnumber],[record variable]);
as a result the form seems to be running but it doesnt hold on the screen, it feels as if it flashes away.
This error can be overcome by doing a COMMIT before the FORM.RUNMODAL (as i think the error also suggests)
However, as you want to present the imported data to the user, for his/hers approval before writing it to the DB, you have to modify the behavior of the import, rather than doing a COMMIT.
What i think you should do, is to import the data into a temporary record-variable.
Then run the form on the temp-rec instead.
Then if the user presses OK (which i expect is how he/she indicates that the record is OK) in the form, you then transfer the temporary record to the actual table.
This can be achieved by wrapping your RUNMODAL in an IF/THEN-statement.