We want to hide the quantity field in the packing list for a specific article… What would be the easiest way to do this?
- You can make new section that will CurrReport.SHOUWOUTPUT(MyArtcile = ‘Coffee’); and will not contain Quantity field; 2) You can make BlankZero property to TRUE for this textbox and for specific article clear the Quantity;
hi but i dont think you can hide the Level of the displayed quantity to blank if u use BlankZero Property. Best way use different sections; Harikesh
Originally posted by yharikesh but i dont think you can hide the Level of the displayed quantity to blank if u use BlankZero Property. Best way use different sections;
I mean it this way:- Set BlankZero property to TRUE for the Quantity Textbox
- In OnAfterGetRecord analyse article
- If it’s not needed to show Quantity, clear Quantity
- As Quantity is Zero now it will be blanked on a report output
Did you get the idea?
Never (almost) use the CurrReport.SHOUWOUTPUT statement. The thing is, every (maybe not every, but a lot) line that is skiped will be printed as a empty line at the bottum of the page. Navision programers @ denmark know this, this is why they change those reports in the last Navision version. Use a integer dataitem instead. Link it to the sales lines and skip the complete dataitem when you don’t want to print your line. Refer to the Navision 3.60 reports (205) if you would like to se an example. -----
Set BlankZero property to TRUE for the Quantity Textbox In OnAfterGetRecord analyse article If it’s not needed to show Quantity, clear Quantity As Quantity is Zero now it will be blanked on a report output
Code above will work but I’m not quite sure It’s a good solution and the right way to do this. I would do the following althuoght it’s more work. Make your quantity field a text variable and fill it if it’s not the item you want to exclude. This why you it more easy to figure out what is happening just by reading the code. But I know, this could be debated.
Emiel, when using ths showoutput function you can have problems like you describe, but as far as I know, this only happens when using it on a footer section. I used it a lot on detail lines (e.i. on the detail lines of an invoice) and I never had the problem that it took some empty lines. However, I did so once in a footer section and then it did. Francis
I would use a text-variable. Actually I use text-variables for most sales/purch-lines; that allows me to manage a line by programming instead of using sections and stuff. Very easy to format numbers via FORMAT into a text - and it is VERY easy to blank a texx-variable [:)]