View Full Version : VRW Report View issue
craigkrum
19-May-2010, 03:27 PM
I was able to use the VRW Report View wizard to set up a report view. It works fine when I have the report go to the screen, but when I choose the Print_To_File option and enter a filename the report hangs when I click the Run Report button. When it goes into the debugger it is stopped on the following line of the cVRWAPI.pkg file
// Export the report
Procedure ComReportExport String llsId C_vrwExportFormats lliType String llFileName
Handle hDispatchDriver
Get phDispatchDriver to hDispatchDriver
Send PrepareParams to hDispatchDriver 3
Send DefineParam to hDispatchDriver OLE_VT_BSTR llsId
Send DefineParam to hDispatchDriver OLE_VT_I4 lliType
Send DefineParam to hDispatchDriver OLE_VT_BSTR llFileName
-> Send InvokeComMethod to hDispatchDriver 7 OLE_VT_VOID
End_Procedure
Craig
Vincent Oorsprong
20-May-2010, 12:16 AM
Craig,
What did you pass the value for lliType?
Does it work when you use the export function that uses the export options dialog?
craigkrum
20-May-2010, 12:32 PM
Vincent,
I don't see where to set an lliType parameter in the report. I am using the VRW Report view wizard which creates a very simple report view that contains the following:
Object oReport is a cVisualReport
Set Size to 233 397
Set Location to 5 4
Set peAnchors to anAll
Set psReportName to "players.vrw"
Set psExportFileName to "players.pdf"
Set peOutputDestination to PRINT_TO_FILE
Procedure OnInitializeReport
Forward Send OnInitializeReport
End_Procedure
End_Object
When I change the peOutputDestination to PRINT_TO_WINDOW, the report works fine.
If I use the VRW Integration wizard, I get the dialogue box with the different output options and the export there works fine. I am trying to create a report that is called during another process and will generate a pdf file with no user interaction.
I think maybe I should work with the VRW Integration wizard and not use the VRW Report view wizard.
Vincent Oorsprong
21-May-2010, 12:20 AM
Craig,
You have to set the pPDFExportOptions property too. Do that in your OnInitializeReport event.
craigkrum
21-May-2010, 01:08 PM
Thanks Vincent, works great.
Vincent Oorsprong
22-May-2010, 12:14 AM
For your (and others) information;
I've changed cVisualReport class to always by default set the export options of a report to a defense default setting in case the developer "forgets" to set one of them. See (http://support.dataaccess.com/forums/showthread.php?t=43034) for an updated class.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.