Page 1 of 3
How to create a Single Record Report with join clause
Posted: Tue Jul 24, 2018 8:29 am
by jhe
Hello,
I need to create a single record report that will print the details of a client. My problem is, I can't find how to display the joined table of my query.
for example this sql...
SELECT * FROM Clients
JOIN dependents ON dependents.client_id = Clients.client_id
WHERE client_id = '#client_id#'
Is there any way to do that?
Re: How to create a Single Record Report with join clause
Posted: Thu Jul 26, 2018 5:06 am
by admin
jhe,
You can use a record created with the SQL Builder instead of a table.
https://wiki.nubuilder.cloud/ ... orts#Table
Steven
Re: How to create a Single Record Report with join clause
Posted: Thu Jul 26, 2018 5:24 am
by jhe
Thanks for Reply Admin,
I am using SQL builder to generate report. The problem is, my tables have a 1 to many relationship.
For example:
Client Table
ID-NAME
1-CLIENT A
2-CLIENT B
--------------------
Dependent Table
ID-CLIENT ID-NAME
1-1-CLIENT A DEPENDENT 1
2-1-CLIENT A DEPENDENT 2
3-1-CLIENT A DEPENDENT 3
4-2-CLIENT B DEPENDENT 1
5-2-CLIENT B DEPENDENT 2
------------------
how can i display that in a single record report when i choose to print client a record with its dependents?
Re: How to create a Single Record Report with join clause
Posted: Thu Jul 26, 2018 5:50 am
by admin
jhe,
I'm not sure what you mean by "Single Record Report".
Your query...
SELECT * FROM Clients
JOIN dependents ON dependents.client_id = Clients.client_id
WHERE client_id = '#client_id#'
... may return more than one record.
Steven
Re: How to create a Single Record Report with join clause
Posted: Thu Jul 26, 2018 7:23 am
by jhe
Hello Admin,
hmmm. You are right Admin.
How about i want something like this report?
-----------------------------------
CLIENT NAME: CLIENT A
DEPENDENTS:
1 DEPENDENTS 1
2 DEPENDENTS 2
3 DEPENDENTS 3
------------------------------------
reports like personal information. Is that possible?
Re: How to create a Single Record Report with join clause
Posted: Fri Jul 27, 2018 2:44 am
by admin
jhe,
Yes, it is.
When using the Report Designer, if you create a Group on CLIENT NAME to sort and a Header to place the CLIENT NAME in.
https://wiki.nubuilder.cloud/ ... Properties
Steven
Re: How to create a Single Record Report with join clause
Posted: Fri Jul 27, 2018 7:22 am
by jhe
Hello Admin,
what about the dependents list? where can i put it?
and what if i have another one? character reference list?
Re: How to create a Single Record Report with join clause
Posted: Wed Aug 15, 2018 11:58 pm
by admin
jhe,
Sorry but I don't understand your question.
Steven
Re: How to create a Single Record Report with join clause
Posted: Tue Jun 04, 2019 4:22 am
by nc07
Hi, I am new to this forum and have started using nuBuilder forte for a few weeks now which awesome.
I have a form and I have created a report using SQL. I would like to generate a report(certificate) based in the current opened record. I have tried #RECORD_ID# filter but it seems not working; it outputs all record.
Re: How to create a Single Record Report with join clause
Posted: Tue Jun 04, 2019 5:09 pm
by Janusz
Hi, please find enclosed short example how to join current record with the report.
https://drive.google.com/open?id=1p0sfH ... 4RMsG9vlIb