Error mismatch input variable # 2

Discussion forum about all things Report Builder (all versions).
aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 05 Dec 2012, 17:23

hello ,

i 'm using centura SQLWindows v 2.0 and Report Builder
i try to print an QRP (PERDIEMS.QRP) that data are taken from a centura window (FPerdiems)
i have my QRP in file PRINT.
i put this code :
On AM_Imprimer
Call ApercuEtatParSociete('PERDIEMS.QRP', FPerdiems)

when i click to see before print, i have this error : mismatch input variable # 2 namefield.

can someone help me ? thank you

Jeff Luther

Error mismatch input variable # 2

Post by Jeff Luther » 05 Dec 2012, 22:46

FYI, if this is a CTD v2.0 issue, as you write, this is in the wrong forum area. It should be in TD v5.2 and Older... and the Older Releases section. I am moving this thread to that section.

Jeff Luther

Error mismatch input variable # 2

Post by Jeff Luther » 05 Dec 2012, 22:49

It means that item #2 in the Input Items string list does not match (likely wrong data type) the #2 item in the Bind Vars list. There are a lot more parameters to the print or preview calls than your own function, ApercuEtatParSociete().

See TD Help for the SalReportPrint or SalReportView calls. And you will need to put on your debugging 'hat' and single-step your code into that Apercu function to see what it's doing. Did someone change the QRP file for Input Items? Or maybe this never worked?

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 06 Dec 2012, 09:20

Thank you very much Jeff, i 'm trying to apply what you said

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 06 Dec 2012, 12:17

Hello Jeff,
i used SalReportPrint with the correct parametres.
the last error (mismatch input variable) was not exist , but i have a new error : he can't open the QRP document .
i create a new QRP one with the same names of input items and variables that i used them in SalReportPrint , but always the same error exist

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 07 Dec 2012, 09:37

Good morning,
the mismatch error returned again,
i defined the input items (the items's Form ), the input variables (to use them in the sql requete), the document QRP and all the reste of SalReportPrint 's parametres (lastpage,firstpage,nError).
i configure the variables to items using SalReportSet*Va(hWndReport,'itemname',variablename).
but finaly , i have the same error : Error mismatch input variable # 2 despite that the input items type and name are correct and similair in the Report builder and Centura

Jeff Luther

Error mismatch input variable # 2

Post by Jeff Luther » 10 Dec 2012, 18:36

but finaly , i have the same error : Error mismatch input variable # 2 despite that the input items type and name are correct and similair in the Report builder and Centura
Debugging -- 2 'directions' that I often use:
1 -- start 'simple', work up to the complex until the problem appears;
2 -- start 'complex' (that is, with the error) and start simplifying until the problem/error etc. goes away.

The error is telling you what the problem is. It's now a debugging process to narrow down the code and/or QRP to see where the problem is.

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 19 Dec 2012, 18:02

thank you Jeff for yours precious advices,

know I can see my QRP, but i with this error : ORA 01009 missing mandatory parameter

Jeff Luther

Error mismatch input variable # 2

Post by Jeff Luther » 19 Dec 2012, 20:24

ORA 01009
Now you are reporting an ORAcle SQL error, #1009: http://oracle.errorcodeslist.com/databa ... 09-action/

I might suggest some background info. on your part because it sounds like you are not clear on what could be the issues you are reporting:

Oracle DB <--> TD application --> call QRP and provide data to --> ReportBuilder runtime

TD app & QRP file -- you first reported a "mismatch input var. #2" -- this means that TD's variables whose values are being passed to RB runtime with the data has #2 at least where TD var. datatype != RB QRP input item #2 data type

ORA 1009 -- this is completely different and sounds like it mean that a query (?) or similar has a missing parameters. Maybe a stored procedure?

I think some background info. might help you understand better TD and RB. We ships a series of PDF ebooks:
intro.pdf -- TD intro.
dev.pdf -- detailed info. on TD programming
report.pdf -- Report Builder info.

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 21 Dec 2012, 09:34

good morning Jeff,

Thank you very much for your precious advices,
know i can print my QRP but with out the data witch are in the Form.
I think that is question of where i have to put the SQL requete ,
in my code, i puted it in On SAM_ReportFetchInit

aymen.ettayeb

Error mismatch input variable # 2

Post by aymen.ettayeb » 25 Dec 2012, 13:55

Hello Jeff,

the QRP displayed without the Form's values despite that when i debugg , the input items take the values.

Jeff Luther

Error mismatch input variable # 2

Post by Jeff Luther » 26 Dec 2012, 19:40

Code: Select all

I think that is question of where i have to put the SQL requete
If I understand what you wrote, not that is not the issue. The "error mismatch" has to do with:
* the TD data type variable that is among the SalReport function strVariables string list and the RB input item data type variable in the strInputs string list.

These parameters are those in this, SalReportView function for example:
hWndReport = SalReportView ( hWndFrm, hWndRptTemp, strTemplate, strVariables, strInputs, nFlags )

For each in the lists of those variables, each must match in data type. I recommend that you read the TD ebook report.pdf, and expecially the section in Creating Reports/Input data types for details.

As I wrote earlier, I also recommend you start with a *simple* query, TD test case + a qrp to display a couple values that are fetched in the query.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests