I want to change all my report forms to use private data sessions along with
a classed data environment. This is because the same report can be called
from a number of different places in our program and I dont want to have to
set up the data environment each time. I understand that I could use a form
dataenvironment class but dont want to do this at this stage.

However, I need some way to do 2 things:

1. Put user definable preprocessed code into the INIT method. however I dont
want the users to edit this directly in case they stuff up the code the
class puts in so I would like this added in real time when the report is
run.

2. I am setting table filters based on suer selection outside the report and
as the reports are now private data sessions, do not inherit the filters I
have set. So I want to capture the filter status of all the tables and then
somehow pass this to the report init method to go through each table and set
the appropriate filters.

Hope this helps.

Cheers
David

Re: How Can I temporarily update FRX Init method in real time? by Eugene

Eugene
Wed Oct 12 20:48:34 CDT 2005

David Younger wrote:
> I want to change all my report forms to use private data sessions along with
> a classed data environment. This is because the same report can be called
> from a number of different places in our program and I dont want to have to
> set up the data environment each time. I understand that I could use a form
> dataenvironment class but dont want to do this at this stage.
>
> However, I need some way to do 2 things:
>
> 1. Put user definable preprocessed code into the INIT method. however I dont
> want the users to edit this directly in case they stuff up the code the
> class puts in so I would like this added in real time when the report is
> run.
>
> 2. I am setting table filters based on suer selection outside the report and
> as the reports are now private data sessions, do not inherit the filters I
> have set. So I want to capture the filter status of all the tables and then
> somehow pass this to the report init method to go through each table and set
> the appropriate filters.
>
> Hope this helps.
>
> Cheers
> David

You may want to rethink using filters. I have long since given up on
using tables, filters and indexes for my reports.

Much cleaner and faster to use SQL statements to get your data and
just make sure to have the correct WA selected before running your report.

Re: How Can I temporarily update FRX Init method in real time? by Dan

Dan
Thu Oct 13 11:30:36 CDT 2005

You can't really have self-modifying code at runtime. But you can have
"dynamic" code.

Before calling your report, do something like this:

TEXT TO lcCommands
* here put all your commands to set up your data
ENDTEXT

In your report DE's INIT you put ExecScript(lcCommands).

If you're going to all this work, though, I wonder why use a DE at all.


Dan


David Younger wrote:
> I want to change all my report forms to use private data sessions
> along with a classed data environment. This is because the same
> report can be called from a number of different places in our program
> and I dont want to have to set up the data environment each time. I
> understand that I could use a form dataenvironment class but dont
> want to do this at this stage.
>
> However, I need some way to do 2 things:
>
> 1. Put user definable preprocessed code into the INIT method. however
> I dont want the users to edit this directly in case they stuff up the
> code the class puts in so I would like this added in real time when
> the report is run.
>
> 2. I am setting table filters based on suer selection outside the
> report and as the reports are now private data sessions, do not
> inherit the filters I have set. So I want to capture the filter
> status of all the tables and then somehow pass this to the report
> init method to go through each table and set the appropriate filters.
>
> Hope this helps.
>
> Cheers
> David



Re: How Can I temporarily update FRX Init method in real time? by David

David
Sun Oct 16 21:01:54 CDT 2005

Thank you,

This helped a lot.

Cheers
David


"Dan Freeman" <spam@microsoft.com> wrote in message
news:eMq2xNB0FHA.2960@tk2msftngp13.phx.gbl...
> You can't really have self-modifying code at runtime. But you can have
> "dynamic" code.
>
> Before calling your report, do something like this:
>
> TEXT TO lcCommands
> * here put all your commands to set up your data
> ENDTEXT
>
> In your report DE's INIT you put ExecScript(lcCommands).
>
> If you're going to all this work, though, I wonder why use a DE at all.
>
>
> Dan
>
>
> David Younger wrote:
> > I want to change all my report forms to use private data sessions
> > along with a classed data environment. This is because the same
> > report can be called from a number of different places in our program
> > and I dont want to have to set up the data environment each time. I
> > understand that I could use a form dataenvironment class but dont
> > want to do this at this stage.
> >
> > However, I need some way to do 2 things:
> >
> > 1. Put user definable preprocessed code into the INIT method. however
> > I dont want the users to edit this directly in case they stuff up the
> > code the class puts in so I would like this added in real time when
> > the report is run.
> >
> > 2. I am setting table filters based on suer selection outside the
> > report and as the reports are now private data sessions, do not
> > inherit the filters I have set. So I want to capture the filter
> > status of all the tables and then somehow pass this to the report
> > init method to go through each table and set the appropriate filters.
> >
> > Hope this helps.
> >
> > Cheers
> > David
>
>