Hi!
I have about 300 new reports in my nav database and I need to write down the names of only those that are not ProcessingOnly. Do you know any smart way how to do this quick? Can I filter my new reports somehow? It'll take some time to check every single new report.
I'll appreciate any clues!
Answers
Objects are stored as BLOB's so theres no fast easy way IMO.
Maybe you can make something happen by exporting them as text and look for the layout part.
However if I was in your position I would probably just go through them one by one.
Function to get the list:
LOCAL PROCEDURE GetReportsWithoutLyout@1000000005();
VAR
Object@1000000000 : Record 2000000001;
StandardTextTEMP@1000000001 : TEMPORARY Record 7;
BEGIN
Object.SETRANGE(Type, Object.Type::Report);
IF Object.FINDSET THEN REPEAT
IF FORMAT(REPORT.DEFAULTLAYOUT(Object.ID)) = 'None' THEN BEGIN
StandardTextTEMP.Code := FORMAT(Object.ID);
StandardTextTEMP.Description := Object.Name;
StandardTextTEMP.INSERT(FALSE);
END;
UNTIL Object.NEXT = 0;
PAGE.RUNMODAL(0,StandardTextTEMP);
END;
You can add ID filter on object record if you want to loop not through all reports.
for Microsoft Partners
I have one problem though, with the REPORT.DEFAULTLAYOUT(...) part - i'm using 2009r2 and I'm afraid that's the case - I cannot compile the object: "You have specified unknown variable DEFAULTLAYOUT". I think it's only possible to use this function in version >=2015, am I right?
for Microsoft Partners
you may like my blog post
https://wordpress.com/post/navnab.wordpress.com/417
With something like perl or awk, you can even compile the list directly from the exported object file in one go with a one-liner.