Create a simple report for customer list. The report should be in landscape with 15 or more columns. In the options tab, there should be 5 checkboxes indicating any 5 columns. If I select those checkboxes then they should not be printed and the columns should be moved. We are talking about moving of columns on the fly. can any one explain me how to create a report...and where should we write code..?
0
Comments
onaftergetrecord() trigger:
IF NOT Hide THEN
FormatAddr.Customer(CustAddr,Customer);
IF NOT HideName THEN BEGIN
FOR i := 1 TO ARRAYLEN(Customer.Name) DO
CustAddr[3] := Customer.Name;
CustAddr[3] := CustAddr[2];
TName[1] := Customer.FIELDCAPTION(Name);
END;
IF NOT HideAddress THEN BEGIN
FOR i := 1 TO ARRAYLEN(Customer.Address) DO
CustAddr[1] := Customer.Address;
TAddress[1] := Customer.FIELDCAPTION(Address);
END;
IF NOT HideCity THEN BEGIN
FOR i := 1 TO ARRAYLEN(Customer.City) DO
CustAddr[2] := Customer.City;
TCity[1] := Customer.FIELDCAPTION(City);
END;
IF NOT HideCountry THEN BEGIN
FOR i := 1 TO ARRAYLEN(Customer.County) DO
CustAddr[4] := Customer.County;
TCountry[1] := Customer.FIELDCAPTION(County);
END;
IF NOT HideContact THEN BEGIN
FOR i := 1 TO ARRAYLEN(Customer.Contact) DO
CustAddr[5] := Customer.Contact;
TContact[1] := Customer.FIELDCAPTION(Contact);
END;
while running the report I am not able to move the columns properly..
ReportColumns : Array[15] of Text
the last line
the filler character in the part of the code is required to avoind compressing columns which are supposed to be shown but have no value.
You can remove it after COMPRESSARRAY
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03