I'm a little confused about what you're asking, but I think you want to put it in the ON CLOSE DESIGNER action. Let me tell you what I do:
In the Report > Action > On Before DESIGN (not before generate), I include this code:
SET VAR vexist INTEGER = 0
SELECT COUNT(*) INTO vexist FROM sys_tables WHERE sys_table_name = 'temptablename'
IF vexist = 0 THEN
CREATE TEMP TABLE ....
SELECT COUNT(*) INTO vexist FROM sys_tables WHERE sys_table_name = 'temptablename'
IF vexist = 0 THEN
CREATE TEMP TABLE ....
ENDIF
That way, if the table already exists, with data I'm using for testing, I don't trash it. If I wanted to drop it every time to start fresh, then I just eliminate the whole IF, and use code similar to yours, but again, in the on before DESIGN action.
-------------- Original message from "Paul InterlockInfo" <[EMAIL PROTECTED]>: --------------
> Ooops! I forgot to mention. That part works fine! The Report |
> Action | Before Generate .eep
>
> I can create it and it runs fine - The report, but where would you DROP the
> temp table?
>
> It would be nice if it was all inclusive in the "Report | Action" however
> if you drop the table after generate and then go to designer it will fail to
> find temp Table. So I have "Drop tTable in my eep that runs this report
> (then not inclusive in the report) Because the tTable got dropped (The
> Report | Action |? Tried several options). I suppose I could insert a "if
> vuser = me then .... .... ... do not drop tTable" in order to keep
> the tTable so report Designer will work. But I was only wondering if there
> is an easier way.
>
> At the moment I just had to create the tTable first and then use the report
> designer. I had to this morning to get the work around.
>
>
>
> I think I'm nit picking here also. I just thought I would ask, seemed
> like a good day (not many posts).
>
>
>
> Sincerely,
> Paul Dewey
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB
> Sent: Wednesday, July 30, 2008 11:44 AM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Report | Action
>
> create your temp table for the Design session in the "onBeforDesign" eep...
>
>
>
> ----- Original Message -----
> From: "Paul InterlockInfo" <[EMAIL PROTECTED]>
> To: "RBASE-L Mailing List"
> Sent: Wednesday, July 30, 2008 11:36 AM
> Subject: [RBASE-L] - Report | Action
>
>
> Curious thought and looking for options.
>
>
>
> If you create a temp table in a Report|Action Example:
>
> SET ERROR MESSAGE 2038 OFF
>
> DROP TABLE tinstall
>
> PROJECT TEMPORARY tinstall FROM cust USING ALL WHERE install > (#DATE - 365)
>
> ORDER BY install DESC
>
> SET ERROR MESSAGE 2038 ON
>
>
>
> Where would YOU drop the tTable. If you do it in one of the actions, it
> seems
> you stop your ability to use the report designer (of course you can
> pre-create
> a temp table) but is there another way in actions that is short and sweet
> (less
> than 50 lines of code). I am now just dropping the table in the .eep that
> launched the report.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Sincerely,
>
> Paul Dewey
>
>
>
>
>
> New Horizon Interlock Inc.
>
> New Horizon Safety Diagnostics Inc.
>
> www.interlockinfo.com
>
> Saving Lives - One Breath at A Time T
>
>
>
> This e-mail message is intended only for the named recipient(s) above and is
>
> covered by the Electronic Communications Privacy Act 18 U.S.C. Section
> 2510-2521. This e-mail is confidential and may contain information that is
> privileged or exempt from disclosure under applicable law. If you have
> received
> this message in error please immediately notify the sender by return e-mail
> and
> delete this e-mail message from your computer.
>
>
> Ooops! I forgot to mention. That part works fine! The Report |
> Action | Before Generate .eep
>
> I can create it and it runs fine - The report, but where would you DROP the
> temp table?
>
> It would be nice if it was all inclusive in the "Report | Action" however
> if you drop the table after generate and then go to designer it will fail to
> find temp Table. So I have "Drop tTable in my eep that runs this report
> (then not inclusive in the report) Because the tTable got dropped (The
> Report | Action |? Tried several options). I suppose I could insert a "if
> vuser = me then .... .... ... do not drop tTable" in order to keep
> the tTable so report Designer will work. But I was only wondering if there
> is an easier way.
>
> At the moment I just had to create the tTable first and then use the report
> designer. I had to this morning to get the work around.
>
>
>
> I think I'm nit picking here also. I just thought I would ask, seemed
> like a good day (not many posts).
>
>
>
> Sincerely,
> Paul Dewey
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of MikeB
> Sent: Wednesday, July 30, 2008 11:44 AM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Report | Action
>
> create your temp table for the Design session in the "onBeforDesign" eep...
>
>
>
> ----- Original Message -----
> From: "Paul InterlockInfo" <[EMAIL PROTECTED]>
> To: "RBASE-L Mailing List"
> Sent: Wednesday, July 30, 2008 11:36 AM
> Subject: [RBASE-L] - Report | Action
>
>
> Curious thought and looking for options.
>
>
>
> If you create a temp table in a Report|Action Example:
>
> SET ERROR MESSAGE 2038 OFF
>
> DROP TABLE tinstall
>
> PROJECT TEMPORARY tinstall FROM cust USING ALL WHERE install > (#DATE - 365)
>
> ORDER BY install DESC
>
> SET ERROR MESSAGE 2038 ON
>
>
>
> Where would YOU drop the tTable. If you do it in one of the actions, it
> seems
> you stop your ability to use the report designer (of course you can
> pre-create
> a temp table) but is there another way in actions that is short and sweet
> (less
> than 50 lines of code). I am now just dropping the table in the .eep that
> launched the report.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Sincerely,
>
> Paul Dewey
>
>
>
>
>
> New Horizon Interlock Inc.
>
> New Horizon Safety Diagnostics Inc.
>
> www.interlockinfo.com
>
> Saving Lives - One Breath at A Time T
>
>
>
> This e-mail message is intended only for the named recipient(s) above and is
>
> covered by the Electronic Communications Privacy Act 18 U.S.C. Section
> 2510-2521. This e-mail is confidential and may contain information that is
> privileged or exempt from disclosure under applicable law. If you have
> received
> this message in error please immediately notify the sender by return e-mail
> and
> delete this e-mail message from your computer.
>
>

