Get query parameters from end user to generate report in base?

asked 2015-01-31 11:19:59 +0200

Wildcard gravatar image

Hello, I'm relatively new to Base (though very familiar with Calc). I have a very good understanding of the capabilities of Base but not a whole lot of know-how on how to accomplish specific details. (I am reading what tutorials I can find.)

I am right now trying something with Base as the front end for a Calc spreadsheet. All I need to do from Base is generate specific queries and put them in a report which can be printed. (Multiple different reports, actually.)

Trick is, almost none of the filter criteria are static. Most will depend on user selection, such as start date and end date in all reports, and specific names as parameters in other reports. (Ideally the names will be given from a drop down list gathered from a "select distinct" query, for ease of use to the end user. Not sure if a drop down selection is possible for a parameter for a report.) (Honestly, not even sure if it's a parameter for a REPORT that I need, or if the parameter is part of the query itself and is just automatically requested of the user when the report calls the query—basic theory data I'm missing here.)

I'm a bit adrift on how to even write the criteria, as the documentation I have found doesn't explain the syntax clearly, even for something simple like customer = "Nick", let alone things like "date > user given date" or "date and time > user given date + 12 hours".

Can anyone explain, or give me a link to a tutorial that clearly explains how to write filter criteria in query design view, including syntax, conjunctions, collecting user parameters, etc.? I actually have lots of questions, but I haven't found any good starting point; with a good tutorial I think I'll work out most of the answers myself. (And I'll switch to SQL view to improve my knowledge of SQL, also. ;)

edit retag flag offensive close merge delete

Comments

May be Mariano Casanova, Page 118? Or Page 143?

JohnSUN gravatar imageJohnSUN ( 2015-01-31 11:47:09 +0200 )edit

That was very helpful! Now I've got it asking for parameters, but I don't know how to get them typecast correctly. If I want the user to put in a date, what format should be used to enter it? (None that I've tried worked.) Is there a way to "clean" the input?

(This might be called a new question, but really it's just "How to successfully get and use parameters from end user for a query in Base? :) Thanks!

Wildcard gravatar imageWildcard ( 2015-02-01 08:41:04 +0200 )edit

Discussed the UNO date struct on stackoverflow, might help.

doug gravatar imagedoug ( 2015-02-09 02:47:04 +0200 )edit