How to programmatically call the DialogPage Cancel Button event - delphi-7

Using Fast Report VCL component.
In the Report I would automatically cancel the report generation based on certain criteria.
I am using Fast Report DialogPage and put in 2 button (Btn OK and Btn Cancel)
The report is working correctly when the user presses the Ok Event (to Generate) and Btn Cancel (To cancel the report generation.)
What I would like to achieve is to call the Cancel Button Programmatically via from the Script to cancel the Report Generation.
How to do this?
IF <condition> then
BtnCancel.click();

Try
if <condition> then
DialogPage1.ModalResult := mrCancel;

Related

mark complete from another context

I have an Account form.
In the interactions tab I have the sub grid for meetings.
I have added the new button to this Sub-grid, 'Complete the Meeting'.
I want to trigger the 'Mark Complete' button of the Meeting form from here.
How can I do it ?
My first choice would be using Activities subgrid instead of Appointments. I just verfied as below.
If that wont work for you for any reasons, then custom ribbon button is a good choice. You have to customize the command of your custom button to use javascript command, then pass the selected IDs from subgrid to ribbon button command and iterate the IDs for updating Appointment records using Xrm.Webapi in javascript function.

separate action for [OK] and [IGNORE] button

in Oracle Apex I have a page where I want to edit individual records. To do this, the user selects a data record and then clicks the [OK] or [IGNORE] button. Here I have defined that the page is to be sent and then an update and insert takes place under PROCESSING. But he works "logically" one after the other. When I click [OK] an insert and update should take place and when I select [IGNORE] only an update without insert in a table should take place. Whats the best way to do this?
Process lets you create a Server-side condition which - additionally - offers you to choose which button it is related to.
Therefore, create two processes, each for its own button. Doing so, process will fire only when its button is pressed.
There are multiple options:
Create one page process per button and put a server side condition on each process (server side condition = When Button Pressed). Same answer as Littlefoot.
Create a single page process and in your source you manage the different cases. On submit, the value of the REQUEST is the name of your button. So your page process code could be
IF :REQUEST = 'OK' THEN
--code to execute when OK is pressed
ELSIF :REQUEST = 'IGNORE' THEN
--code to execute when OK is pressed
END IF;
You'd want to put a serverside condition on this of type "Request is contained in value" with a value of "OK;IGNORE". This will yield true if button OK or button IGNORE is pressed.

Foxpro form "stopping" work after report call

I have a form to call a report, the form contant btnPrint
In my "Print" button click, I call the report
btnPrint.click
REPORT FORM rpthocbong PREVIEW
After the button was clicked, the button "Print" is "flat-down" and cannot click again
Have you tried adding this after your report form call?
this.enabled = .t.

Oracle Forms Developer 6i: EXECUTE_QUERY do not working after ENTER_QUERY Mode

I have 2 data block 'Employee' as master and 'Employee_Details' as details and 1 control block for navigation. I have used my menu and usually the default developer toolbar was not appeared. So I place a Enter-Query button to serve the purpose. I used when-button-pressed trigger.
GO_BLOCK('EMPLOYEE');
IF :System.Mode = 'NORMAL' THEN
Enter_Query;
ELSE
EXECUTE_QUERY;
END IF;
In first trigger the Form goes to Enter-Query Mode. But when I pressed for Execute_Query it does not work. Rather it shows in status bar to press F8 to do query and Ctrl+q for cancel. I tried it to place the code in different button but not working. I do not want to press F8 for execute query. Why my button code not working for Executing Query? Have you any solution?
The problem probably is that there are a few options with your trigger.
One of them is if it will fire when in enter query mode.
Because you are in enter-query mode right now this switch should be true.
Then it will work.
The default for the switch is false, so no trigger will fire in enter-query mode.

Display Modal Pop-up window during controller action execution

I have a controller action, which during its HTTP Post action, should display a Modal Pop-up window during a certain business condition.
It is basically a Product terms and conditions pop-up, which the user should accept to continue with the execution.
Any suggestion on how to implement this pop-up ?
Once the user accepts the terms and conditions, the execution should continue
Is it possible in the same controller action ?
Any suggestion would be of great help.
Thanks in advance

Resources