ramide
21-Sep-2010, 12:56 PM
Hello
I'm starting to use the "Visual Report Writer" and have a question that I believe is a very simple solution, but could not find.
I created a report using the wizard VRW. The piece of code that interacts with the report is as follows:
Procedure StartReport
Integer eOutputDevice
String sReportName
Boolean bOk
String sReportId
String sFilterFunction
String sFromSizesCode sToSizesCode
Get Value of oFromSizesCode To sFromSizesCode
Get Value of oToSizesCode To sToSizesCode
Move (Trim (sToSizesCode)) To sToSizesCode
Move (Trim (sFromSizesCode)) To sFromSizesCode
If (sFromSizesCode <> "") Begin
Move (sFilterFunction + (If (sFilterFunction <> "", " and ", "")) + "{SIZES.Code} >= CStr (" + '"' + sFromSizesCode + '"' + ")") To sFilterFunction
End
If (sToSizesCode <> "") Begin
Move (sFilterFunction + (If (sFilterFunction <> "", " and ", "")) + "{SIZES.Code} <= CStr (" + '"' + sToSizesCode + '"' + ")") To sFilterFunction
End
Move "TestVRW1.vrw" to sReportName
Get Output_Device_Mode to eOutputDevice
Get OpenReport of oVRWPreviewPanel sReportName to bOk
If (bOk) Begin
Set peOutputDestination of oVRWPreviewPanel to eOutputDevice
If (sFilterFunction <> "") Begin
Set psFilterFunction of oVRWPreviewPanel to ("Return" * sFilterFunction)
End
Send StartReport of oVRWPreviewPanel
End
End_Procedure
In the report "TestVRW1.vrw" I created a function called "MyTest" and would send a text to this function to be displayed in the report. Like I said before, this is a very simple question, but I am not able to do... :(
The question is:
What must I include in that code up there to pass a value to a function of VRW??
If you want to send me a complete example, feel free! :o
Best regards
I'm starting to use the "Visual Report Writer" and have a question that I believe is a very simple solution, but could not find.
I created a report using the wizard VRW. The piece of code that interacts with the report is as follows:
Procedure StartReport
Integer eOutputDevice
String sReportName
Boolean bOk
String sReportId
String sFilterFunction
String sFromSizesCode sToSizesCode
Get Value of oFromSizesCode To sFromSizesCode
Get Value of oToSizesCode To sToSizesCode
Move (Trim (sToSizesCode)) To sToSizesCode
Move (Trim (sFromSizesCode)) To sFromSizesCode
If (sFromSizesCode <> "") Begin
Move (sFilterFunction + (If (sFilterFunction <> "", " and ", "")) + "{SIZES.Code} >= CStr (" + '"' + sFromSizesCode + '"' + ")") To sFilterFunction
End
If (sToSizesCode <> "") Begin
Move (sFilterFunction + (If (sFilterFunction <> "", " and ", "")) + "{SIZES.Code} <= CStr (" + '"' + sToSizesCode + '"' + ")") To sFilterFunction
End
Move "TestVRW1.vrw" to sReportName
Get Output_Device_Mode to eOutputDevice
Get OpenReport of oVRWPreviewPanel sReportName to bOk
If (bOk) Begin
Set peOutputDestination of oVRWPreviewPanel to eOutputDevice
If (sFilterFunction <> "") Begin
Set psFilterFunction of oVRWPreviewPanel to ("Return" * sFilterFunction)
End
Send StartReport of oVRWPreviewPanel
End
End_Procedure
In the report "TestVRW1.vrw" I created a function called "MyTest" and would send a text to this function to be displayed in the report. Like I said before, this is a very simple question, but I am not able to do... :(
The question is:
What must I include in that code up there to pass a value to a function of VRW??
If you want to send me a complete example, feel free! :o
Best regards