Hello there,
I want to build a report with only one row of a table for printing. i want to use a report because i can arrange the items as wanted!
I didnt find any solution yet. Can you help me?
Regards,
Alex
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.
print report
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: print report
Hi,
Have you already created the report with "Fast Form"?
Is there just one row in the table or do you want to print a specific row that you select?
And what do mean by printing? Outputting it as pdf?
Have you already created the report with "Fast Form"?
Is there just one row in the table or do you want to print a specific row that you select?
And what do mean by printing? Outputting it as pdf?
-
- Posts: 10
- Joined: Thu Aug 13, 2020 2:11 pm
Re: print report
Hi, thank you for your fast reply !
Yes, I created a report with fast report, but when i run it, the output is the entire table, i just want a specific row in a table.
Its like when you have records about lots of people but you want to print a birth certificate.
Yea, outputting as pdf would be great, but i have 2 problems :
1. I need just a specific row(a specific person)
2. I must arrange the objects in page(because i will literally print it on an A5 page - as i said, like a birth certificate- the data must fit into the page and I need to arrange the objects)
Thank you in advance,
Alex
Yes, I created a report with fast report, but when i run it, the output is the entire table, i just want a specific row in a table.
Its like when you have records about lots of people but you want to print a birth certificate.
Yea, outputting as pdf would be great, but i have 2 problems :
1. I need just a specific row(a specific person)
2. I must arrange the objects in page(because i will literally print it on an A5 page - as i said, like a birth certificate- the data must fit into the page and I need to arrange the objects)
Thank you in advance,
Alex
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: print report
Two possibilites:
1. Specify a "Launch From" which will show a form before the report is generated where you can select the record to be printed.
https://wiki.nubuilder.cloud/ ... aunch_From
2. Run the report on a button click and show it in an iframe/new tab.
https://forums.nubuilder.cloud/viewtopic. ... 444#p21485
In both cases, use a Hash Cookie in the SQL that looks similar to this.
1. Specify a "Launch From" which will show a form before the report is generated where you can select the record to be printed.
https://wiki.nubuilder.cloud/ ... aunch_From
2. Run the report on a button click and show it in an iframe/new tab.
https://forums.nubuilder.cloud/viewtopic. ... 444#p21485
In both cases, use a Hash Cookie in the SQL that looks similar to this.
Code: Select all
WHERE record_id = '#RECORD_ID#'
-
- Posts: 10
- Joined: Thu Aug 13, 2020 2:11 pm
Re: print report
OK
THAT WORKED!!!
but there is a problem... i will have to change '#RECORD_ID' in the SQL code everytime i want to print a new certificate.
isnt there an option to select the last record? or something like this.
THANK YOU SO MUCH!
THAT WORKED!!!
but there is a problem... i will have to change '#RECORD_ID' in the SQL code everytime i want to print a new certificate.
isnt there an option to select the last record? or something like this.
THANK YOU SO MUCH!
-
- Posts: 10
- Joined: Thu Aug 13, 2020 2:11 pm
Re: print report
ok I've got an idea but i dont know how to implement it!
I saw that there is a function called MAX. I tried to write this in SQL:
but it didnt work. Any idea why?
I saw that there is a function called MAX. I tried to write this in SQL:
Code: Select all
WHERE record_id = MAX(record_id)
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: print report
'#RECORD_ID#' is correct to refer to the current record.Ricu wrote:i will have to change '#RECORD_ID' in the SQL code everytime i want to print a new certificate.
This would allow you to print the currently open record.
Is your "record_id" really numeric? Then you could try sorting the rows in descending order and get the top row:Ricu wrote: I saw that there is a function called MAX. I tried to write this in SQL:Code: Select all
WHERE record_id = MAX(record_id)
Code: Select all
SELECT *
FROM your_table
ORDER BY record_id DESC
LIMIT 1
-
- Posts: 10
- Joined: Thu Aug 13, 2020 2:11 pm
Re: print report
WOW
It worked perfectly(the one with
Thank you so much!!!
It worked perfectly(the one with
Code: Select all
SELECT *
FROM your_table
ORDER BY record_id DESC
LIMIT 1