on 01-06-2015 11:56 AM
Hi All,
I've got 2 tables: Invoices and Images like below. Due to the nature of the report (discussed here) they must be joined within record selection section, not in sql command nor in links, and the joining (or selection in this case) should look like {Invoice.Date}>={Images.DateFrom} and {Invoice.Date}<={Images.DateTo}.
Images table includes records that should appear only on some of the invoices i.e. some invoices will have an image some will not. Joining/selection like the above excludes Invoice.Id=3 because its data does not fall into any images date range. Question is - how can I do the record selection so that all invoices are included even these that have no image?
Invoices
Id | Date |
---|---|
1 | 2015-01-06 |
2 | 2015-01-16 |
3 | 2015-01-26 |
Images
Id | DateFrom | DateTo |
---|---|---|
1 | 2015-01-02 | 2015-01-18 |
2 | 2015-01-30 | 2015-01-31 |
Regards,
przemek
Hi Przemyaslaw,
You can add the Record Selection formula by going to Report -> Selection Formulas -> Record...
Add the below code and save it :
if {Invoice.Date}>={Images.DateFrom} and {Invoice.Date}<={Images.DateTo} then
true
else
false;
Thanks,
Nrupal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.