PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Special case
  • Example
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
iPrintReport (External language)
In French: iImprimeEtat
Prints a report created with the report editor.
Syntax
iPrintReport(<Report Name> [, <View Identifier> [, <Parameter 1 to 4>]])
<Report Name>: Character string
Name of the report to print.
<View Identifier>: Character string (optional)
Identifier of the view to print.
<Parameter 1 to 4>: Character string (optional)
Optional parameters expected by the report for its execution. These parameters are defined in the opening code of the report. These parameters can be the name of a view, the name of a memory zone, etc.
Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively).
iPrintReport(<Report Name> , <Bound 1> [, <View Identifier> [, <Parameter 1 to 4>]])
<Report Name>: Character string
Name of the report to print.
<Bound 1>: Character string
Lower bound for the browse.
<View Identifier>: Character string (optional)
Identifier of the view to print.
<Parameter 1 to 4>: Character string (optional)
Optional parameters expected by the report for its execution. These parameters are defined in the opening code of the report. These parameters can be the name of a view, the name of a memory zone, etc.
Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively).
iPrintReport(<Report Name> , <Bound 2> [, <View Identifier> [, <Parameter 1 to 4>]])
<Report Name>: Character string
Name of the report to print.
<Bound 2>: Character string
Upper bound for the browse.
<View Identifier>: Character string (optional)
Identifier of the view to print.
<Parameter 1 to 4>: Character string (optional)
Optional parameters expected by the report for its execution. These parameters are defined in the opening code of the report. These parameters can be the name of a view, the name of a memory zone, etc.
Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively).
iPrintReport(<Report Name> , <Bound 1> , <Bound 2> [, <View Identifier> [, <Parameter 1 to 4>]])
<Report Name>: Character string
Name of the report to print.
<Bound 1>: Character string
Lower bound for the browse.
<Bound 2>: Character string
Upper bound for the browse.
<View Identifier>: Character string (optional)
Identifier of the view to print.
<Parameter 1 to 4>: Character string (optional)
Optional parameters expected by the report for its execution. These parameters are defined in the opening code of the report. These parameters can be the name of a view, the name of a memory zone, etc.
Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively).
iPrintReport(<Report Name> , <Memory zone> [, <View Identifier> [, <Parameter 1 to 4>]])
<Report Name>: Character string
Name of the report to print.
<Memory zone>: Character string
Numbers of the records to print.
<View Identifier>: Character string (optional)
Identifier of the view to print.
<Parameter 1 to 4>: Character string (optional)
Optional parameters expected by the report for its execution. These parameters are defined in the opening code of the report. These parameters can be the name of a view, the name of a memory zone, etc.
Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively).
Remarks

Special case

  • The different syntaxes correspond to the different methods for calling a report. The type of call is linked to the choices made when defining the report (file or memory zone, with or without bounds, ...)
  • In addition to the parameters required by the printout (name of the report, lower bound and upper bound or memory zone), 4 additional string parameters can be used. The value of these parameters is accessible in the codes of the report via the _pParam1, _pParam2, _pParam3 and _pParam4 variables.
  • In standard, the report editor locks no data file.
    In custom mode, if the processes of the report do not manage the concurrent accesses, the error "05" may occur and the execution of the report is canceled.
    To avoid having this error in custom mode, the lock mode must be changed before the execution of the report:
    HClose("")
    HModeSemiPerso()
    iPrintReport(ReportName)
    HClose("")
    HModePerso()

Example

The following programs give a simple example in VB, Turbo Pascal for Windows and C. This example starts two reports with bounds:
  • bounds.wde (numeric bounds)
  • bounds2.wde (character string bounds)
Example in C:
int PASCAL WinMain(HANDLE hInst,HANDLE hPrevInst,LPSTR lpCmdLine,int nCmdShow)
{
long Bound1,Bound2;
char value1[10],value2[10];
// numeric bounds
Bound1=5;
Bound2=8;
CALLWD("iPrintReport,bounds.wde,\t%ld\t%ld",Bound1,Bound2);
// text bounds
strcpy(value1,"D");
strcpy(value2,"M");
CALLWD("iPrintReport,bounds2.wde,\t%s\t%s",value1,value2);
WDEnd();
return(0);
}
Example in Turbo Pascal for Windows:
Begin
/* numeric bounds */
Bound1:=5;
Bound2:=8;
CALLWD('iPrintReport,bounds.wde,'+chr(9)+ITOS(Bound1,1)
+chr(9)+ITOS(Bound2,1));

/* text bounds */
value1:='D';
value2:='M';
CALLWD('iPrintReport,bounds2.wde,'+chr(9)+value1
+chr(9)+value2);

WDEnd;
End.
Example in VB:
Sub main()
' numeric bounds
Bound1=5
Bound2=8
Call CALLWD("iPrintReport,bounds.wde,"+chr$(9)+
str$(bound1)+chr$(9)+str$(bound2))
' text bounds
value1$="D"
value2$="M"
Call CALLWD("iPrintReport,bounds2.wde,"+chr$(9)+
value1$+chr$(9)+value2$)

call WDEnd
End
End Sub
Minimum required version
  • Version 14
Comments
Click [Add] to post a comment