Welcome! Log In Create A New Profile

Advanced

Report based on a variable

Posted by gga 
gga
Report based on a variable
October 21, 2018 02:18AM
Just for fun I decided to try this but I can't figure out how to use anything other than a global variable.
In WinDev22 I created an Invoice class which contains all of the header and detail (Invoice lines).
I created a variable on the window that shows the Print Button but that is obviously the wrong place because the Report does not seem to recognize it. I even passed it as a parameter to the report.
Garry
Re: Report based on a variable
October 21, 2018 02:32PM
Hello Garry,

Yes this can be done. I have a class that fills the data of the variable from the window and when it is time to print a pass 1 array for the rows and 1 structure variable for the header of the class to the print window.

The button from the window
clTrInstall is clTRInstallList

clTrInstall.cm_TR_InstallQuery(nLoadID)
clTrInstall.cm_ReportHeader(nLoadID)

iPreview(100)

iPrintReport(RPT_TR_Load,clTrInstall.m_arrInstallList,clTrInstall.m_LoadInfo)

//In the report the same arrays from the class are used.
PROCEDURE RPT_TR_Load(arrInstallList is array of clTRInstallList.stInstallList,gstLoadinfo is clTRInstallList.stLoadInfo)


DW
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: