Can anyone tell me if there is an example anywhere in NAV 2013r2 that I can look at for the following: I have a page that sets filters on the Sales Header table. I would call another page from the ribbon and on this page I would like to have a summary of information that is contained on the first page of the following information;
SELECT [SHIPMENT DATE], WeekdayName(DatePart("w",Fields!ShipmentDate.Value),True,0), COUNT(*)
I have already created a report with this information now I need a page. Thank you
*This post is locked for comments
Hi Kim,
You can try FlowField.
will give it a try thank you
Well use the COPYFILTERS function to copy the filter from the selected record and then remove the primary key filters to loop through
Ex: CreateTempDataSet(SalesHeader) -- > Where salesheader is the selected from first page
SalesHeader2.COPYFILTERS(SalesHeader);
SalesHeader2.SETRANGE("No.");
IF SalesHeder2.FINDSET THEN
REPEAT
// Here you do SETRANGE on TEmp To find if the Group by field already exist if not insert otherwise modify.
TempSalesHeader := SalesHeader2;
TempSalesHeader.INSERT;
UNTIL SalesHEader2.NEXT = 0;
OK, well that part worked thank you, I used a query object. But bow I need to get the filters from the initial page applied to the query or temporary table, so that it only groups and displays from the data on the initial page.
Kim
I am not sure if there is a place in standard NAV with this functionality but to achieve your requirement you can do the following
When you call the action from the ribbon, add a function which will create your dataset in the temporary table and use that as source for the page.
When you insert data into temporary table look for the group by field if that value already exists update the existing record with Count.
Thanks
Suresh
I forgot to add the group by at end of query sorry:(
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156