Dear folks, I'd like to know how do this. I've a report with 4 dataitems, in groups of two, I mean that they are in the same report but works different and doesn't are linked between them, I execute one or the other clicking the option on the request form and, in sections, I show it or hide.
But now I want that when I filter by "Order Date" on first Dataitem, the third dataitem gets also the filter that I put (this dataitem also has the "Order Date" field). How can I do that?.
Thanks.
0
Comments
My Blog - nav.education
Var1:= "Purch. Rcpt. Header".GETFILTER("Order Date"); but it doesn't work. Can you put me an example if you're so kind?
Thanks in advance.
To get the filter on first table:
On PreReport Trigger:
Rec1.GETFILTER("Order Date");
For applying this filter to 2nd table:
On PreReport Trigger:
Rec2.CopyFilter("Order Date",Rec1."Order Date");
Hope this helps
Linkedin Profile: http://in.linkedin.com/in/dhanrajbansal
To apply the filter you need to apply it in OnPreDataItem not in OnPreReport, else it would be reset in OnPreDataItem... if I remmember correctly
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Linkedin Profile: http://in.linkedin.com/in/dhanrajbansal
Thanks for help.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Rec1.GETFILTER("Order Date"); it says to me "Have to use the return value of this work" and stops after GETFILTER. Do you know what can be the problem, please?.
Thanks.
FilterString := Rec1.GETFILTER("Order Date");
Add a textbox to you report with SourceExp = Filterstring
If I remember correctly :-k
**Edit I guess I should have read the first post slower**
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for help.
So filterstring gave you the return variable that the error message was looking for. If you added a textbox w/filterstring as it's sourceexp and put it in the header (for example) it would printout. that's all, that was about.
can you explain what you are doing on the second dataitem that isn't working?
Rec2.CopyFilter("Order Date",Rec1."Order Date"); did you try this?
Rec2.CopyFilter("Order Date",evaluate(filterstring)); perhaps? not tested
Each dataitem has it's own OnPreDataItem
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for your help and time.