Hi All,
I'm trying to prevent a report from printing DataItem A section results based on dataitem B's 'create total' results... (where, dataitem B is nested in dataitem A)
The only way to test 'createtotal' results for variables in Dataitem B is in the 'OnPostSelection' of the Footer section of Dataitem B... but, by the time this section is reached, every section of Dataitem A is printed.
any idea how to work around this situation?
Thanks in advance!
ps. 'PrintOnlyIfDetail' does not work since, Dataitem B will always have detail to print.
0
Comments
Then, still in the pre-section, you need to have:
CURRREPORT.SHOWOUTPUT(your condition here);
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I'm trying to modify Nav's standard report #10138 - so that when all columns are printing '0' for a certain item, nothing prints.
How do i calculate totals? 'CreateTotals' function can only be used from a dataitem trigger. i'm getting an error when i try to put this in the pre section of the footer ... :?
//
Code - start
CurrReport.CREATETOTALS(InventoryValue,TotalExpectedCost,TotalInvoicedValue,
ShippedNotInvoiced,ReceivedNotInvoiced,NetExpectedCostNotPosted,
ShippedNotInvoicedPosted,ReceivedNotInvoicedPosted,NetExpectedCostPosted);
CurrReport.CREATETOTALS(InvoicedValueNotPosted,InvoicedValuePosted);
if (InventoryValue = 0 and Total Expected Cost = 0 .... etc) then
DoNotPrint = True;
CurrentReport.Showoutput(NOT DoNotPrint);
//
Code - end
Thanks in advance..
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The only way I find everything Zero is if it's a zero cost item to begin with.
IF that is the case you can set the filter on the item tab to not include unit Cost of Zero.
If you're using Print Details. If you View-> Sections And look at the code on Item Ledger Entry Body(3) that's where you can put your code - See it already has the code there for Details Or Not.. You can add yours too to stop Zero Inventory Valuation Items well.
You want to set this on the sections of the report not from the dataitems Unless you want to use CurrReport.SKIP;
It need to be at the end since the first code already set's everything to zero...
InventoryValue := 0;
InvoicedValue := 0;
InvoicedValueACY := 0;
InvoicedPostedToGL := 0;
InvoicedPostedToGLACY := 0;
InvoicedQty := 0;
ValuedQty := 0;
ExpectedValue := 0;
ExpectedValueACY := 0;
ExpectedPostedToGL := 0;
ExpectedPostedToGLACY := 0;
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://savatage99.googlepages.com/10138 ... oncile.txt
http://www.BiloBeauty.com
http://www.autismspeaks.org
I tried to filter for items where Unit Cost is <>0.. but, it still gives me everything.
I'm trying to see if the total for Inventory Valuation, Received Not Invoiced, Shipped Not Invoiced etc... is zero for an item. if so, then I do not want to print anything for this item.
Yes, thats another thing that i was trying.. however, on predata section, the totals are not calculated.. its only after this trigger is run do i get a value for the variables..
what do you mean by ' it needs to be at the end..' ? End of which section? Please elaborate.
Thanks again..