Dataport which export "report List"

Hi, It’s only few months that I’m working with Navision… so my question could be a bit strange for you. I would like to create a dataport that export the report list and I would to let the user choose which type of report export (G/l Report, etc.). In the table Report List (243) the field “menu id” is filled with the field depends on the report type (eg. the report with “menu id” = 100 refer to “G/L Reports”. How could I do this? At the moment I try with a “not elegant” code like this FilterIdMenu := ‘’; RecRef.OPEN(243, TRUE); FieldNumber := RecRef.FIELDCOUNT; FOR i := 100 TO 103 DO BEGIN IF RecRef.FIELDEXIST(i) THEN BEGIN FldRef := RecRef.FIELD(i); FilterFieldName := FldRef.NAME; MyFilter := “report list”.getfilter(FilterFieldName); IF MyFilter <> ‘’ THEN FilterIdMenu += ‘|’ + FORMAT(i); END; END; but the istruction MyFilter := “report list”.getfilter(FilterFieldName); does not work. Any help or idea would be apreciated. Have a nice day. Nives

Hi Nives, To give an answer to why the instruction “MyFilter := “report list”.getfilter(FilterFieldName);” doesn’t work, I should try it myself. Maybe someone else knows it by heart. [:I] Why do you want to use a dataport? I would suggest the users to copy the list they want and paste it in Excel (assuming you have Excel). Copy the list; select all lines by clicking in the list on the empty column above left. Then right mouse click, copy. Go to Excel, paste. If this is a onetime action, I wouldn’t make a dataport. If not, then I hope someone else will answer the “MyFilter”-question. [:)]

Hi Tino, I don’t know meaning of that dataport, They only asked an Import/export dataport for “Report List” but I don’t know the effective use… Your idea works but It isn’t what I must do. Thank you for your help. Bye bye Nives

quote:

then I hope someone else will answer the “MyFilter”-question. -------------------------------------------------------------------------------- greetings, Tino Ruijs

I would still retrieve the meaning of the dataport. I could save you some work. If you want that. [:)]

Thank you very much Tino, You are very kind but I don’t know anithing else about that report and at the moment I’ve stopped my work on that. If I will know more about that I will tell you. Thank you again. Bye bye Nives

quote:

They only asked an Import/export dataport for “Report List”

Hi Nives, I have previously made just such a dataport. (attached) I’ve just inserted “MenuId” as RequestFilterField (Note that lookup doesn’t work properly on this field, but you can just type the filter you need) You must also remember to make sure that all relevant Dataportfields are defined. I made this dataport for an earlier version, so new fields must have been added to the table (243) regards Alexander
Attachment: Imp_Exp_reportlist.fob ( 5242bytes )

I’m assuming the users will not know that menuid 100 = G/L Reports. You could use the STRMENU command to prompt the user for the kind of reports they would like to export and set your filters that way. For example, MenuFilter := STRMENU(GL Reports,AR Reports,AP Reports,…); CASE MenuFilter OF 1 : “Report List”.SETFILTER(“Menu ID”,‘100’); 2 : “Report List”.SETFILTER(“Menu ID”,‘102|103’); 3 : “Report List”.SETFILTER(“Menu ID”,‘104|105’); … END; Then you would just need to have table 243 (Report List) set as your data item. If you want, I can e-mail you the dataport that does this. It didn’t take long to write and you can see if it does what you intended. David Hibler

Thank you to everybody for the help! Alexander I can’t dowload your fob I don’t know why, but the page isn’t accessible. David, You wrote code that could be usefull for me, also if in that way user can choose only one type of report at time. I’ll propose that solution. Thank you Have a nice day [:D] Nives