Invalid object name '#Tmp_PDPR' while setting up Data Source Stored Procedure
I've created a FastReport and would like to retreive the data with a Stored Procedure. Within the stored procedure, a temporary table is created, called #TmpPDPR. While defining the parameters in FastReport, it gives me the error Invalid object name '#TmpPDPR', and then continues to the Define Columns window. Does this mean it won't work?
This discussion has been closed.
Comments
I found the solution. Add this before the query:
Set FMTOnly OFF
https://stackoverflow.com/questions/45635406/query-with-temp-table-cant-execute-without-set-fmtonly-off
Hello!
Add SET FMTONLY OFF at the beginning of the query/procedure (or rewrite the temporary table to the table variable @TmpPDPR / CTE). Alternatively, specify the column schema manually in the Define Columns window that opens in the FastReport designer (click the Add button -> specify the names and types of the fields returned by the procedure).