Is there a way in C/AL code in a report to modify a textbox property during runtime?
Paul could you be a bit more specific? What are you trying to achieve? David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk
No, you can’t change any properties on a report textbox/labels at runtime. Of course you can modify the value of the expression in the SourceExpr property. But this is the basic of the reports nature, showing values :-). Soren Nielsen, moderator Integration/Developer NOLUG
I have a specficiation for a customer to create a dynamically sized two dimensional array report that looks basically like this: XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX The size of this two dimensional array can change at run time, between 1 to 12 columns and 1 to 15 rows (lines). Each element is surrounded by a rectangle shape. Any suggestions?
You only really need a single Dimension and the Integer table Integer on PreDataItem SETRANGE(Number,1,RowCount); As you need boxes around the fields! Only way I can see is to have 12 integer body sections with boxes 1 - 12 1 12 123 1234 12345 etc: Go through your array to get the filled ColumnCount Sections with the boxes INTEGER BODY 1 OnPreSection() CurrReport.SHOWOUTPUT(ColumnCount=1); INTEGER BODY 2 OnPreSection() CurrReport.SHOWOUTPUT(ColumnCount=2); INTEGER BODY 3 OnPreSection() CurrReport.SHOWOUTPUT(ColumnCount=3); etc: I would tell the Customer that the boxes will incur extra work and maybe cost, also will take up time that could be spent on other Modifications or Reports. David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk
Paul, I think the best answer to your problem is Excel! If the Matrix cells are numeric values, I would definitely recommend to write them in an excel worksheet rather than printing. ------- With best regards from Switzerland Marcus Fabian
Thanks David, I tried doing that, but for some reason Navision sees fit to allocate all body space regardless whether output is turned on or not, meaning that if I defined 12 different bodies (because of the depth of each line) it will page wrap after each line!
Paul, Make sure the body-sections have no empty lines (blank space between your controls and the next section), as these are not influenced by SHOWOUTPUT. John
Paul Sorry! The Section properties KeepWithNext needs to be set to “No”. If they are yes Navision will save the space! As in the early customer labels reports David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk
I often use the Blank if Zero property to simulate a dynamic report. Use Text boxes for Labels. Create a array for all text boxes that you are using as labels. Only give them value after you determain if the column will be printed. This will enable you to only have a single body section. Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117