PDA

View Full Version : Displaying Report



ge_nildo
12-May-2009, 01:02 PM
I did a test, where I could print a report using visual 14.1, but I couldn't display the report in the screen. Follow the test.

Use Windows.pkg
Use DFClient.pkg
Use cVisualReport.pkg
Deferred_View Activate_oReportWriter for ;
Object oReportWriter is a dbView
Set Border_Style to Border_Thick
Set Size to 51 161
Set Location to 39 41
Set Label to "Report Wiriter Test"
Object oButton1 is a Button
Set Size to 15 77
Set Location to 19 41
Set Label to "Run Report"

// fires when the button is clicked
Procedure OnClick
Set peOutputDestination of oReport to PRINT_TO_WINDOW
Send RunReport of oReport
Send DisplayReport of oReport
End_Procedure
End_Object
Object oReport is a cVisualReport
Set psReportName to "S:\SISTEMAS\NOVO\SAF2008V141\DATA\List1.vrw"
Set peOutputDestination to PRINT_TO_WINDOW
Procedure OnInitializeReport
Forward Send OnInitializeReport
End_Procedure
End_Object // oReport
Cd_End_Object

bartek kaluzinski
13-May-2009, 08:02 AM
Hello ge_nildo.
Your approach is correct, although it is not necessary to specify „DisplayReport” as „RunReport” is sufficient. Unfortunately at this moment our class only supports printing, that is why you can’t display your report yet. This feature will most likely be added soon with the next Visual Report Writer release.
If you want to see for now how a report would be displayed, you can add an object of a BasicPanel class to your view and use it for displaying your report.

Focus
13-May-2009, 09:00 AM
Bartek

"soon with the next release of Visual Report Writer" .... any approx timescale ? days/weeks/months?

Thanks

Andrew

bartek kaluzinski
14-May-2009, 02:30 AM
Andrew,
We expect to release second VRW Alpha on May 20th.

ge_nildo
14-May-2009, 03:49 PM
Hello ge_nildo.
Your approach is correct, although it is not necessary to specify „DisplayReport” as „RunReport” is sufficient. Unfortunately at this moment our class only supports printing, that is why you can’t display your report yet. This feature will most likely be added soon with the next Visual Report Writer release.
If you want to see for now how a report would be displayed, you can add an object of a BasicPanel class to your view and use it for displaying your report.

Ok. Thanks. I'll be waiting.