Our application which generates reports from a grid of data is causing some odd behavior at random. This problem was found by our testers, usually after running many reports within the same session. Essentially, after "n" attempts, the DEMO banner appears on the reports, and from that point until the machine is rebooted, the DEMO banner appears on any report run from that point forward.
The code is running on a local workstation.
I have read references on the board regarding the need / need to not call VpeCloseDoc(), which I am not calling in code.
So the flow is:
long ch_VPE;
ch_VPE = VpeOpenDoc(m_hWnd, "Report Output",VPE_NO_RULERS|VPE_NO_INFOBUTTON);
VpeLicense(ch_VPE, "key one", "key two");
... call another class which actually writes the data, passing in ch_VPE
VpePreviewDoc(ch_VPE, NULL, 2);
The user would preview, maybe print and then close the preview. They may or may not close the dialog where they select the report type to run.
My question is, in regards to the way the app operates, do we need to watch for the preview window to close and at that point call VpeCloseDoc()? I am confused as to why the DEMO banner appears after "n" runs of the report code within a single application on a local box. Does calling VpeLicense() over and over cause any potential issues?
Thanks for any insight.
--Rob.