I confirm the GPF in demo.prg, but your C code looks good.rathinagiri wrote: I had first used the ReportMan.ocx as an activeX control and satisfied with the operations. But, we have to install the ReportMan.ocx in c:\windows\system32 directory with the command "regsvr32 Reportman.ocx"
Then, as suggested in the site, I had created libreportman.a with the help of impdef and dlltool utilities. I had created demo file for HMG and found it working. (I don't know why the program crashes when we cancel preview/print button. Otherwise it works nice. I am sure 'C' Gurus in the forum can easily solve this.)
Anyway, I'm sure that something is wrong, because (as I've posted previously) the program requires the ocx, even when it should not happen (if you delete/unregister the ocx, Windows tell you that the it is missing).
The second program (demo_ocx.prg) works fine. The only problem to me is the need to create the datasource 'by hand'. I guess that there is some way to automate this but I don't know it.
The other problem, is the need to use a SQL query. This could be problematic for some users.
Despite that, it is a good alternative.
Regards,
Roberto.