Home » Developer & Programmer » Reports & Discoverer » DATE
DATE [message #187810] Tue, 15 August 2006 15:21 Go to next message
sweetgeegee27
Messages: 107
Registered: June 2005
Senior Member
Help me! I do not want the date and user to change if only a a copy of the report is printed. How do I do that?

function AfterReport return boolean is
CURSOR C IS
  SELECT USER,  sysdate, DOC_STATE_NO
  FROM DUAL, DOC_STATE
  WHERE DOC_STATE_DESC LIKE 'PRINTED';
  V_USER		VARCHAR2(8);
  V_DATE		DATE;
  V_DOC_STATE_NO	NUMBER;
begin
IF :P_DOC_NO IS NOT NULL THEN
  OPEN C;
  FETCH C
  INTO V_USER, V_DATE, V_DOC_STATE_NO;
  IF C%NOTFOUND THEN
    RAISE NO_DATA_FOUND;
  END IF;
  CLOSE C;
  UPDATE DOCUMENT
  SET PRINTED_DATE = V_DATE
  WHERE DOC_NO = :P_DOC_NO;
  UPDATE DOCUMENT
  SET STATE_CHANGE_USER = V_USER
  WHERE DOC_NO = :P_DOC_NO;
  UPDATE DOCUMENT
  SET STATE_CHANGE_DATE = V_DATE
  WHERE DOC_NO = :P_DOC_NO;
  UPDATE DOCUMENT
  SET DOC_STATE_NO = V_DOC_STATE_NO
  WHERE DOC_NO = :P_DOC_NO;
  COMMIT;
END IF;
  return (TRUE);
end;
Re: DATE [message #187878 is a reply to message #187810] Wed, 16 August 2006 03:19 Go to previous message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

How would you know that the report has been printed before and what you are printing now is a copy? Do you have a marker?
Previous Topic: Help me about System Parameter Decimal, Thousand
Next Topic: Discoverer and LOB Type Fields
Goto Forum:
  


Current Time: Sun Dec 04 04:48:28 CST 2016

Total time taken to generate the page: 0.13107 seconds