If you run a report using a ReportListener from the FFC directory, and you're using a successor listener, and that report is run from a form with a private datasession, you end up with a dangling datasession after the report completes. If you keeping running reports in this manner, you keep building up more dangling datasessions. I don't think I have to tell you the consequences of a long day of running reports like this!
I posted this on Microsoft's Connect site so anyone who wants to confirm, vote, comment, etc. about this bug, the ID number is 316134.
Here are the steps to reproduce the problem:
1. Create a form
2. Set the datasession to private
3. Add a button with the following code in the click
lcReport = SYS(2015)
CREATE CURSOR junk (test I)
FOR ln = 1 TO 10
INSERT INTO Junk VALUES (ln)
CREATE REPORT &lcReport FROM Junk
SET CLASSLIB TO 'C:\Program Files\Microsoft Visual FoxPro
ThisForm.oListener = CREATEOBJECT('_ReportLIstener')
ThisForm.olistener.listenertype = 1
ThisForm.o2 = CREATEOBJECT('ReportListener')
ThisForm.oListener.Successor = ThisForm.o2
REPORT FORM &lcReport OBJECT ThisForm.olistener
4. Run the form
5. Click the button
6. Close the report
7. Close the form
8. Open the data session window
9. Notice an Unknown(#) session.