I was wondering if you can pass a temporary table to a dataport for export.
I have tried it by including the following line in a codeunit that contain a function that populates the temp table with the desired records;
but I get an error message when it tried to execute telling me that the dataport does not have a DataItem that uses the table specified in the function SetTableView.
The Dataport has the table listed in the dataitem and it is the same table the temp record is based on.
So why am I getting this error? Can this even be done? I am trying to do with through a temp table so that I do not have to create a new table that is similar to one that I have already created that has the fields that I need. I know that I can use variables in the dataport to include values contained in various tables, but that would mean that I would have to use coded logic to filter the records rather than true filters and therefore would have to scan the entire table everytime I run the report.
If remove the temp table from the RUNMODAL command there is no error (but the dataport uses the data that is in the table - Obviously).
P.S. I know that isn't the Canadian flag... I just thought I would use my Ethnic flag instead of my residence flag.