Hi,
How can i create a report with date range?
Can anyone help?
What should i build first?
I've create bunch of form with date in it, what i would like is to get the report that i've made but with date range.
How can i do that?
Please help
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Create Report With Date Range
Re: Create Report With Date Range
yusa82,
1. Create a Form with from and to dates.
2. Use the SQL Builder to create a SELECT statement using Hash Cookies...
3. Use created Form as the Launch From. and the SQL record as the Table for the Report you create.
Steven
1. Create a Form with from and to dates.
2. Use the SQL Builder to create a SELECT statement using Hash Cookies...
Code: Select all
SELECT * FROM invoices WHERE inv_date BETWEEN '#from#' and '#to#'
Steven
-
- Posts: 16
- Joined: Thu Jan 09, 2020 11:16 pm
Re: Create Report With Date Range
Could you explain the hash cookies part in more detail. I understand what you mean about creating the form and report but I'm not understanding how to make my SELECT statement point to my input in the "from" and "to" textboxes.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 506
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 8 times
- Been thanked: 18 times
Re: Create Report With Date Range
Hi, maybe this can help. It's not for date range - but the way how to use use the hash cookies is the same.
https://forums.nubuilder.cloud/viewtopic. ... 635#p19150
https://drive.google.com/open?id=1p0sfH ... 4RMsG9vlIb
https://forums.nubuilder.cloud/viewtopic. ... 635#p19150
https://drive.google.com/open?id=1p0sfH ... 4RMsG9vlIb
If you like nuBuilder, please leave a review on SourceForge
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Create Report With Date Range
If the Id of "Stat Date" is e.g. start_date ( -> ID in object properties), the hash cookie to be used in your SQL statement is #start_date#. The same for "End Date"
You do not have the required permissions to view the files attached to this post.
-
- Posts: 16
- Joined: Thu Jan 09, 2020 11:16 pm
Re: Create Report With Date Range
Thanks for the quick feedback. The good news is I was on the right track with the ID of the object, however I'm still not able to get it to work. I'm not sure if its some kind of syntax issue with my SQL statement or something else that I'm over looking. Here is a screenshot of the error i get after hitting the "run" button and a screenshot of the SQL statement.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Create Report With Date Range
MySQL expects DATE values to be single-quoted.
Code: Select all
'#test_start_date#' AND '#test_end_date#'
-
- Posts: 16
- Joined: Thu Jan 09, 2020 11:16 pm
Re: Create Report With Date Range
Ok i think i figured out a few of my issues. One was I left out the single quote (is that only expected with DATE values?) Two I didn't have my report designed. Now that I have it working my other issues I only get the run button when I open it through reports rather than through user home.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 16
- Joined: Thu Jan 09, 2020 11:16 pm
Re: Create Report With Date Range
I got the button thing figured out as well. I have another question that advances on what I have already done but I'm going to start another thread for that. Thanks everyone for you assistance!