I am writing a report using the Cust. Ledger entry table. The output of this report should be filtered by date. how can i exclude a particular field not to be filtered but the rest filtered. the excluded field should display all entries to date while the rest should only display entries within the date filtered range.
Thank you
0
Comments
sorry, I could not exactly understand your question but these 2 tips can help you:
1. If you use dataItemtableview property of a dataitem, set a key in it and not use ReqFilterFields, users can not filter that dataitem.
2. If you use this kind of code in OnPreDataItem of a dataitem, user filter for that field will be skipped and your certain filter will be regarded at runtime.
OR
hope this helps.
Thank you
Declare cutomerRec2 as Record Customer.
Then:
CustomerRec2.GET(Customer."No.");
CustomerRec2.COPYFILTERS(Customer);
CustomreRec2.SETRANGE("Date Filter");
CustomerRec2.CACFIELDS(Balance);
.
.
.
The customerRec2 will be used to calculate the balance.
Just remember to check which filters affect the balance. Maybe you'll need to clear also the dimension filters...
CustomerRec2.COPYFILTERS(Customer);
CustomreRec2.SETRANGE("Date Filter");
CustomerRec2.CACFIELDS(Balance);
when you use the above codes is not going to sum the balance base on the date filter specify?
a) Finds the customer currently from the Dataitem to CustomerRec2. ->CustomerRec2.GET(Customer."No.");
b) Copies all the filters you have applied on customer to CustomerRec2. ->CustomerRec2.COPYFILTERS(Customer);
c) Removes any filters from "Date filter" only on CustomerRec2. ->CustomreRec2.SETRANGE("Date Filter");
d) Calculates the flowfields with only the non-removed filters. ->CustomerRec2.CACFIELDS(Balance);
So: If you don't remove the Dimension Filters then the balance will be calculated Using dimension filters and skipping the date filters.
For example, a FlowField does not exist in SQL server. It is calculated from Sift tables or indexed views in latest versions.
Please give an example of what you want to do so we can help more.
I don't quite understand what you mean.
If the field is not a flowfield it means that at any given time the field contains 1 specific value that is stored on the record. You want this field to behave like the Balance and display something similar? You want this field to participate in the flowfilters and change the balance flowfield depending on it's value, similarly to Date filter".
Please give some more details so we can provide more help.
How best to exclude it.