Show filtered date on report
kolaboy
Member Posts: 446
Hi Expert.
I am trying to show date that have been filter to show on a report that is picking informations from the Cust. ledger Entry table. There are two dataitems: Customer and Cust. ledger Entry.
The request form is the customer. But there is no way i can filter posting date in the cust. ledger entry table because it is not part of the fields in the customer table.
i want the report to show the posting date filtered on the report and show on the customer header in the section designed and filter only transactions as at that filtered date.
Any idea please.
Thanks
I am trying to show date that have been filter to show on a report that is picking informations from the Cust. ledger Entry table. There are two dataitems: Customer and Cust. ledger Entry.
The request form is the customer. But there is no way i can filter posting date in the cust. ledger entry table because it is not part of the fields in the customer table.
i want the report to show the posting date filtered on the report and show on the customer header in the section designed and filter only transactions as at that filtered date.
Any idea please.
Thanks
0
Answers
-
Hi
In the Customer PreDataItem put the following code
IF "Cust. Ledger Entry".GETFILTERS <> '' THEN
FilterText := 'Filter: ' + "Cust. Ledger Entry".GETFILTERS;
where FilterText is a variable of type text
create a new heading section for customer and insert a textbox
with SourceExpr FilterText
in the PreSection of this new header put this code
CurrReport.SHOWOUTPUT := (CurrReport.PAGENO = 1) AND (FilterText <> '');
Albert0 -
Add the field 'Date Filter' to the required filterfields on the Customer table dataitem.
Then link the Cust. Ledger Entry to the Customer table by using the property 'DataItemLink' in the Cust. Ledger Entry.
In the DataItem Link-form enter the following :Field Reference Field Customer No. No. Posting Date Date Filter
In the section where you would like to show the filtered date add a textbox with the SourceExpression 'GETFILTER("Date Filter")'0 -
Hi
I have tested your codes and they seems to be doing what i wanted. there is a problem.
When you put a date, it only show all the customers with only transcations of that particular date filtered. e.g if you filter 02/28/07, it gives you the transcations of only 02/28/07.
I wanted the report to show all the customers with there transcations from 01/10/07 up to the date that is filtered i.e 02/28/0, not only the date that is filter. Also there shouldn't be a date beyong the filtered date say 02/28/07.
What is the modification going to be to acheive this?
Thanks0 -
-
I you use the range, the range shows on the report as well. this is not what i want. I want only the end date to show on the report i.e 02/28/07.
It should read as at 02/28/07 not as at 01/01/07...02/28/07
Any idea Pls.
Thanks.0 -
You want to use a range and then use getfilters but not have the complete filter show. Is that correct?
I guess you could always just throw a blank text box over the section of the text box(that shows the filter) that shows the first date.
or format the FilterText & delchr the beginning of the field or copystr just the end.
you know what i mean ?0 -
that exactly what i want. I want only the end date to show.
Can you please explain the steps to me because i don't understand what you mean by:I guess you could always just throw a blank text box over the section of the text box(that shows the filter) that shows the first date.
or format the FilterText & delchr the beginning of the field or copystr just the end.
Please can you explain in step form for me to understand. Am not that experience.
Thanks.
MLS0 -
hi Experts,
I am still tryin g to see how to avoid he start date when a range is taken for the date filter but no luck yet.
can anyone help on suggestions Please.
Thanks.0 -
to show your filters
OnPreReport() you probably have something like
ItemFilter := Item.GETFILTERS;
if you only CUT OUT what you need it should work.
for example - this will give you the characters starting at 5 & going to 15
ItemFilter := COPYSTR(Item.GETFILTERS,5,15);
I think this should work for you, you just need to figure out when to start & when to stop the COPYSTR.0 -
I am someone to tell me how to Modify this code
IF "Cust. Ledger Entry".GETFILTERS <> '' THEN FilterText := 'Filter: ' + "Cust. Ledger Entry".GETFILTERS;
this is what i am using to not show the start date when a range is filtered
eg. If i filter 020207...030307, 02/02/07..03/03/07 shows on the report. i want only 03/03/07 t0 show i.e the end date.
also how can i format the date say 03/03/07 to 3rd March, 2007 form/
Thanks0 -
:shock:
Try this:
IF "Cust. Ledger Entry".GETFILTERS <> '' THEN
FilterText := 'Filter: ' + COPYSTR(Item.GETFILTERS,5,15);
cheers,0 -
You have to play around with it
Using Report 1406 as an example change the OnPreReport()
//This Cuts out the Text of the 2nd dateBankAccFilter := COPYSTR("Bank Account".GETFILTERS,24,15);
//Using evaluate I will convert the date text to a date formatEVALUATE(DateVariable, BankAccFilter);
//using format I can change the date to October 30, 2007BankAccFilter := FORMAT(DateVariable,0,4);
0 -
Hi Kolaboy
to get the last date use the following code if you are sure that the user
enters a range ie 010108..310108EndDate := "Cust Ledg. Entry".GETRANGEMAX("Date Filter");
where EndDate is a Date field
Albert0 -
I have tried all your codes but still no luck with them.
Right nowIF "Cust. Ledger Entry".GETFILTERS <> '' THEN
FilterText := 'Filter: ' + "Cust. Ledger Entry".GETFILTERS;
and the settings:
Field Reference Field
Customer No. No.
Posting Date Date Filter
is working with the range selection, but it is only displaying records say went you filter 02/03/06, the records in the Cust. Ledger entry with posting date 02/03/06 appears and if you filter 010107....02/03/06, the records in the cust. Ledger entry with date from 01/01/07 ...02/03/06 inclusive will appear.
what i wanted is if lets say a date e.g 02/03/07 is filtered, the report should display records from the Cust.Ledger Entry table from 01/01/07 up to 02/03/07 even if you did not put a date range.
and the report should show 02/03/07 on top of your report as the date filter or as at 02/03/07 .
I tried as an alternative way to continue filtering but i don't want the start date to show on the report, only the end date i.e if the range 01/01/07...02/03/07 is filtered, the report should show only 20/03/07 not 01/01/07...02/03/07. I hope i have made myself clear?
Thanks
[/quote]0 -
Did you even try this to see if this provides the desired results?Savatage wrote:You have to play around with it
Using Report 1406 as an example change the OnPreReport()
//This Cuts out the Text of the 2nd dateBankAccFilter := COPYSTR("Bank Account".GETFILTERS,24,15);//Using evaluate I will convert the date text to a date formatEVALUATE(DateVariable, BankAccFilter);
//using format I can change the date to October 30, 2007BankAccFilter := FORMAT(DateVariable,0,4);
You made another statment about perhaps just entering an END DATE and having it automatically filter from 01/01/07 to your END DATE.
You you want a request form that has a box where you enter the end date?
These are two different things than just simply taking the report filters that appear at the top and converting them to a full text date.0 -
I will try to play arround with it, but is there any problem of entering a date and the report filter from 01/01/07 to the date filtered. Hardcode sort of.
I think request form will also do, but with only the end date show on the report. I prefer the first method if there will be a breakthrough.
Thanks0 -
why dont you use GETRANGEMAX instead ?0
-
Sorry this was solved longtime. I should have indicated it.
Thanks for you ideas they help me greatly.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions