So with only SELECT statement now it works fine, right?
SELECT * FROM stockcardDetails
You are correct, Sergey. I made some progress. Here's what I did:
1. Removed the stored procedure call from the query and left alone the command Select * From stockcardDetails;
2. Add some report parameters
3. Modified the pre-build script to accommodate said parameters so that I can use them from Xojo.
report.datasource.sqlSelect("Call genstockcard('" + report.parameterValue( "vDateFrom" ) + "','" + report.parameterValue( "vDateTo" ) + "'," +
report.parameterValue( "vItemID" ) + "," + report.parameterValue( "vStockID" ) + "," + report.parameterValue( "vCustomCond" ) + ",Null,Null," +
report.parameterValue( "vOrderBy" ) + ",Null,'" + report.parameterValue( "vLogo" ) + "');");
4. Preview the report from Valentina IDE. The report is working (please see picture).
5. But when I call the report from Xojo, an exception error was triggered (see error picture).
Does it mean that if the report is called from Xojo, the query takes the precedence?
The error occurs from this code, during the rendering.
Dim pdfData As String = mReport.PrintToBuffer( EVReportPrintType.kToPDF, 1 )