Hi Eloy,
I guess this is related to SAP B1?
Try this:
1) Create a parameter called 'DocKey@' in the report. The datatype should be number and the type should be 'static'.
2) Go to Record Selection Formula and type this code:
{DocNum} = {?DocKey@}
Replace {DocNum} with the database field for DocNum.
-Abhilash