incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drew <d...@baseanswers.com>
Subject Re: VBA
Date Wed, 04 Jul 2012 02:26:46 GMT
On Wed, 2012-07-04 at 10:03 +0800, Chen Peng wrote:
> Hi Stefan,
>       Do you mean you want to open a report then change the filter in the
> report using StarBasic macro?
>       if it is, this is not a VBA issue.
>       You can use the Record Macro function in AOO to store the macro
> action, maybe you can get the answer.

Hi Peng,

The record macro function will be no help here, well not much anyway.

A question of import is - what kind of report is it, one made from the
Report Builder or one made from the embedded report wizard. 

But - you can actually do this without in more ways then using a script
(macro).

1 - Be sure to create dynamic reports.

2 - Base your report on a query.

3 - Change the select criteria in the query before running the report.

For very simple changes you will not need a macro at all - you simply
use parameters for the selection criteria (or parts of it) and the
runtime system will prompt the user for specific values to replace those
parameters with. This is automatic in other words, with a dynamic report
based on a query definition.

//drew


> 
> 
> 
> 2012/7/4 Stefan Lindel <stefan@famlindel.de>
> 
> > I want open a Report and change the filter dynamicly
> >
> > I found the Code to Open
> > subdlg = getController().loadComponent(**com.sun.star.sdb.application.**
> > DatabaseObject.REPORT,"**Ergebnisse",FALSE)
> >
> > but i dont know how i change the filter in the report
> >
> > mfg
> >
> > Stefan
> >



Mime
View raw message