[Solved] Report with variable date

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

[Solved] Report with variable date

Post by Nocton »

I want to run a report showing all data entered since a certain date (StartDate), which is recorded in the table as JoinDate. So when I run the report I want it to ask for StartDate and then run the query/report. How is it best to do this? I thought of having a form on which to enter the desired StartDate, but I do not know how to pass the value to the query/report.

Regards, Nocton
Last edited by Nocton on Tue Oct 04, 2011 7:29 pm, edited 2 times in total.
OpenOffice 4.1.12 on Windows 10
RPG
Volunteer
Posts: 2261
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Report with variable date

Post by RPG »

Hello

I have not a clear solution for your problem. But maybe this can help you a little
http://www.oooforum.org/forum/viewtopic.phtml?t=131237

Maybe it is enough when you change the 1 to 4
oSingleComposer.appendFilterByColumn(oWorkcontrol.model.boundfield ,TRUE,1)

http://api.openoffice.org/docs/common/r ... rator.html

Romke
LibreOffice 24.8.5.2 on openSUSE Leap 15.6
User avatar
probe1
Volunteer
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: Report with variable date

Post by probe1 »

Nocton wrote: in the table as JoinDate. So when I run the report I want it to ask for StartDate
Create a parameter query

Code: Select all

SELECT "name", "value", "JoinDate" FROM "table1" WHERE "JoinDate" >= :StartDate
and set this query as source for the report.
Every time you start the report you are questioned.

Does this help?
Cheers
Winfried

DateTime2 extension: insert date, time or timestamp, formatted to your needs
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Report with variable date

Post by Nocton »

Brilliant, thank you, Winfried. Just what I wanted.

Regards, Nocton
OpenOffice 4.1.12 on Windows 10
Post Reply