Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reports calling an object method
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00197705
Message ID:
00197762
Views:
16
>>
>>Could you post instanciation line (createobject?) for 'oReport'? Basically, you may try to link it safer, i.e. to oApp.oReport property.
>
> Sure, here's the code I'm using right before running the report:
>
>PRIVATE oReport
>
>oReport = CreateObject("ShopReport59")
>oReport.StartDate = ldStartDate
>oReport.EndDate = ldEndDate
>oReport.Shop = lnShopnum
>oReport.Header = THIS.NumToName(lnShopnum)
>oReport.Total()
>
>REPORT FORM "shopreport59.frx" NOCONSOLE TO PRINTER
>
>Actually, the oReport object has a "Print()" method, but I'm not using it because I'm using a wrapper function to print to a PDF file. I know the PDF wrapper isn't the problem, since it does the same thing when I run the above code. I also tried the above code right from the command window and it does the same thing. Preview works, Print fails (w/o any errors, just 999 filled fields).
>
> If it couldn't find the object, shouldn't I be getting an error? It just seems weird that I can PREVIEW the report and the report looks perfect. As soon as I print it, it returns 999 in all the object referenced fields.
>
>-Paul

I would still try to inittiate the object differently:
oApp.oReport= CreateObject("ShopReport59")
and use it subsequently. Could you try it?
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform