OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to fill parameters in Query Documents with Basic

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
mobi-doc
OOo Enthusiast
OOo Enthusiast


Joined: 30 Jan 2007
Posts: 130
Location: Thessaloniki

PostPosted: Sun Oct 28, 2007 1:21 pm    Post subject: How to fill parameters in Query Documents with Basic Reply with quote

There is a Report Document (Sun Report Builder) based on a parametrized Query Document. Every time I lunch the report a dialog pops up to fill the parameters of the Query.

Is there a way to open the report and fill the parameters with BASIC code, in order to suppress the dialog?

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Sun Oct 28, 2007 4:01 pm    Post subject: Reply with quote

Yes, but it is a little bit of a work around.

There is a known problem with actually supplying data to a parameterized query via Basic at runtime. It don't work - in simple terms.

However you can do this.

Create a query with a parameter(s) and save it.
Base your report design on this query.

Create a macro that
    Grabs a the query definition.
    Use the QueryAnalyzer service to get the part of the query with the parameter
    Replace the parameter with your data
    Save the query definition
    Launch the report


Now, if that helps great - if you need some more detail on specific steps in that simply ask
_________________
Blog - http://baseanswers.spaces.live.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mobi-doc
OOo Enthusiast
OOo Enthusiast


Joined: 30 Jan 2007
Posts: 130
Location: Thessaloniki

PostPosted: Thu Nov 01, 2007 9:46 am    Post subject: Reply with quote

Finally I think I'll need an example of how to do the procedure you described.

Thank you.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group