Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report Object Assisted in DLL problem
Message
From
01/04/2008 11:58:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Report Object Assisted in DLL problem
Miscellaneous
Thread ID:
01307380
Message ID:
01307380
Views:
63
Hi all,

I have a Session class that instantiates a ReportListener object. The ReportListener object uses the _GDIPlus.vcx to print rectangles on the Page Footer band of a report. Basically, the intent of the report is to plot a production run schedule using a rectangle for each production run. The report layout has the hours (6 AM to 6 AM) for 24 hours on the left side, top to bottom. The days of week (Monday to Friday) go from left to right.

When I run the program from VFP, the output is properly rendered. However, the actual consumer of this report is one of our VFP8 (eight) application and I have to create a single-threaded DLL from the VFP9 report project.

My problem is that the report output is not properly rendered when ran as a DLL. The problem is that when the Render() method is called, the parameters are not correctly passed by the ReportListener object.

To reproduce the behavior, download and set up the following in your local machine. The zipped file can downloaded at:
https://alcanos.homeserver.com/Remote/files.aspx?share=db7b13df-2560-492f-818a-365ab73b66af
username: visitor (case sensitive)
password: Visit040108 (case sensitive)

1. Create the VFP9 project: Name the project as AvailReport and add these files:
1.1 ProductionRun.prg (Set Main)
1.2 ProductionRuns.Fr* (in Document)
1.3 _GdiPlus.vc* (in Classes) - Not attached. You can find these in the VFP9 folder.
1.4 *.H (2 files in Text Files)

2. Copy the AvailTest.dbf/fpt into the same folder.

3. Set default to current folder and Run in VFP9, ProductionRun.prg (Observe the proper behavior of the report). Also, take note of the Top,Left numbers in the Prod Run of the debug text that will come up after you close the report.

4. Compile as Single-Threaded DLL. MTDLL is not allowed.

Test the DLL
1. Run the TestReport.prg from VFP8 or VFP9. There will be no preview and the report is directly outputed to the printer. Take note of the Top,Left numbers in the debug text after the report is printed. You will see that all the values are Left:8488 Top:8488.

NOTE: There is a known bug in Windows that can cause your computer to crash. The KB is documented here with the bug fix. Your version of Windows may or may not have the bug. Link: http://support.microsoft.com/?kbid=935843

Thank you for your feedback.
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform