Hello, I am making a report that works with dates. I have created a field type date in the Request Form called "datefilter" so that it appears in the Option eyelash.
Report shows sale orders and purchase ones from a reference. I want that this date acts as a filter date in these orders. For sale orders "Shipment Date" and for of purchase ones "Date Confirmation". So, when indicating a date in "datefilter", would want that it filtered by date shipment and date confirmation respectively, putting the amounts according to that filter date in one section that I created in report; I don't want to use the "Shipment Date" and "Date Confirmation" by other reasons. How can I do it?
Thank you very much.
0
Comments
Write ur in this way:
Item.SETRANGE(Item."Date Filter",StartDate,EndDate);
where StartDate and EndDate are variables with Datatype Date.
Navision Technical Consultant
Thank you very much for your help.
I don't know my question is same with DarkHorse's
My problem is this:
I have one report, it has date filter. User gives that date. And i need to use that date in other C/AL, to take range with other table. But i couldn't do that.
Please give me an advice
Best Regards
if the user enter a date in the, for example Item-, Requestform you can get the value in this datefilterfield like:
TheDateFilter := MyDataItem.getfilter(MyDateFieldOnRequestForm);
Regards
i will try this way.
MyDateFieldOnRequestForm= "ReportName"."FilteredDate"-?
i'm doing like this.
But it says FilteredDate is unspecified variable.
I have declared "ReportName" to report variable.
and i dont get clear about "MyDataItem". It must be table-?
You need the value of this filter to work with it in an other (second) DataItem, correct?
If both is yes, you can get the DateFilterValue from the first DataItem with:
//MyDateTextVariable variable of type text
MyDateTextVariable := NameofTheFirstDataItem.getfilter(NameofTheDateField); //getfilter returns the value of the "NameofTheDateField" in the first Dataitem.
Now you can work with "MyDateTextVariable". for example to use it as filterconstruct (setfilter()) in the second dataitem.
Regards
Regards
NameOfFirstDataItem must be table? It's can't be a report?
What is the FilterConstruct?
Because setfilter is using only in table. There must be declared the table of our MydatetextVariable. But now it's only a date. Need to specify a table. But it doesn't have a table.
evaluate(datevariable, mydatetextavariable);
setfilter(datevariable, Table."datefieldforFilter");
then it's easier to help and understand correct what you want.
Regards
In my case filtering from one table. But Mydatetextvariable doesn't have any tables. Mydatetextvariable is only text variable, or it can converted to date variable.
Right now i don't have any code. If i can do this then i will write my code. Because i'm using that Mydatetextvariable once.
But i don't know it is possible.
vat_invoices Element Text <vat_invoices> /indentation 0/
vat_info Element Text <vat_info> /indentation 1/
title Element Table <Company Information>(Company Information) /indentation 2/
tin Element Field <Company Information>::VAT Registration No. /indentation 3/
taxpayer Element Field <Company Information>::Name
begin_date Element Text <begin_date>
end_date Element Text <end_date>
sell_sum Element Text <sell_sum>
sell_vat Element Text <sell_vat>
sell_total Element Text <sell_total>
purch_sum Element Text purch_sum
purch_vat Element Text purch_vat
purch_total Element Text purch_total
no_vat Element Text no_vat
with_vat Element Text with_vat /indentation 3/
invoice Element Table <Vendor Ledger Entry>(Vendor Ledger Entry) /indentation 2/
invoice_no Element Text invoice_no /indentation 3/
saler_tin Element Text saler_tin
saler_name Element Text saler_name
purchaser_tin Element Text purchaser_tin
purchaser_name Element Text purchaser_name
invoice_date Element Text invoice_date
goods_amount Element Text goods_amount
vat_amount Element Text vat_amount
invoice_amount Element Text invoice_amount
goods Element Text goods/indentation 3/
no Element Text no
goods_name Element Text goods_name/indentation 4/
quantity Element Text quantity
count Element Text count
unit_price Element Text unit_price
price Element Text price/indentation 4/
VendorLedgerEntry- Table
PurchInvHeader - Table
Date Filter - field, type is date, fieldclass-flowfilter
or it is not possible to take value like that?