Hi Frank, *,

Frank Schönheit - Sun Microsystems Germany escribió:
Hello "FamiliaFrazelle",

i've built a form in ooBase, with a button to *print* a report with the currently displayed *record*'s data.

I got the code to build the macro that opens the report document from the forum. However, I still need the StarBasic source-code to specify the *record* to display. Has anyone tried this? Is it possible?

Unfortunately, there's no direct method to move to a certain record,
defined by its field/content. The API currently only supports
positioning by row number (which is useless when you only know you wanbt
to position on "the record where field X has value Y"), and positioning
by bookmarks, where a bookmark is a unique value for each row, but of
completely unpredictable (and implementation-dependent) value.

The only thing I can suggest right now is to retrieve the logical form,
and move through it until the desired record is found.

To prevent flickering, you should not do the search on the form itself,
but on a clone: Use the form's method "createResultSet", which will
create a new result set, which shares its data and its bookmarks with
the form. Then, search the desired record in the clone, and move the
form to the bookmark of the found record.

Something like
  resultSet = form.createResultSet()
  // look through resultSet for the desired record
  form.moveToBookmark( resultSet.getBookmark() )


For a while now, there are plans for an API which would allow this in
one step - something like "form.moveTo( <some_selected_column_values>
)", but this is not concrete, yet.


If I understood well, they are talking about a REPORT, not a FORM.

I think they have a form, and they want to print a REPORT for the current record they see in the form.

Did I get it? :-(


Regards
Ariel



--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.ArielConstenlaHaile.com.ar/ooo/



"Aus der Kriegsschule des Lebens
                - Was mich nicht umbringt,
        macht mich härter."
                Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to