Re: Passing Forms 4.5 data to Reports 2.5 for printing

From: Steve Barrett <steve_at_eurovis.demon.co.uk>
Date: 1997/05/16
Message-ID: <01bc623c$91c68e80$44d9989e_at_eurovis.demon.co.uk>#1/1


You are creating a record group though based on a query, namely the system.last_query, you are not basing it on the rows already retrieved by your form.
Therefore when you pass the DATA_PARAMETER for the record group to Reports it uses it as a pointer to Forms 4.5 record group. This group is based on a query so it executes the query and retrieves the data. If you do not want the query to run twice you need to instead create a record group that is not based on a query but instead you programatically add the rows into the created record group as you are retrieiving them into the form.

You probably therefore want to do the following :-

  1. In a PRE-QUERY trigger Delete the record group if it exists (use ID_NULL and DELETE_GROUP) Create the record group and required columns (CREATE_GROUP,ADD_GROUP_COLUMN)
  2. In a POST-QUERY trigger Add the retrieved row to the record group (ADD_GROUP_ROW,SET_GROUP_XXX_CELL)
You might have to be wary of the amount of rows and size of rows you are adding to this record group, I am not sure of the limits but there is bound to be some. It depends on your circumstances, if the query retrieves a small amount of rows that take a long time to be returned from a query I can see the point of doing this otherwise if you are retrieving a large amount of data I would be tempted to keep it working the way you have it, based on a query.

Steve

Laura Larry Van Deusen <laura_at_jcc.com> wrote in article <33724857.E63_at_jcc.com>...
> I have a screen full of information from Forms 4.5. I want to pass the
> data to Reports to print (or mail) it.
> I use System.Last_Query to grab the forms query, create a record group
> from the query, create a parameter list and add the record group name to
> it and use Run_Product and pass the parameter list. This works fine. I
> see my data in Reports just like I want it.
> My problem is that when I monitor the database, I can see Reports
> repeating the database fetch for the query. I can't afford a second
> database hit. I figure if I already fetched the rows once in forms,
> reports ought to be able to access them for print, display, etc. How do
> I do this?
> Thanks,
> Laura Van Deusen
> Laura_at_jcc.com
>
Received on Fri May 16 1997 - 00:00:00 CEST

Original text of this message