ahmedsa
September 6, 2012, 9:29am
1
I make report in this report i need to make report to quantity this report design is
Customer
(inden)Sales Line
i want to add “concrete No” from table of “reservation schedule” i write this codein after get record trigger of Sales line table
IF cust.GET(“Sell-to Customer No.”)THEN
desc:=cust.“Concrete No.”;
but it give me this error" the expression code cannot be type converted to integer value"
i defined two variable in global c/al
desc code 10
cust record reservation scheduale
then i put desc text box i report but it give me error as above
I make report in this report i need to make report to quantity this report design is
Customer
(inden)Sales Line
IF cust.GET(“Sell-to Customer No.”)THEN
desc:=cust.“Concrete No.”;
Use
IF cust.GET(“Sell-to Customer No.”)THEN
desc:=FORMAT(cust.“Concrete No.”);
ahmedsa
September 6, 2012, 9:40am
3
I try then It give me same error
Is Concrete No. in Customer table an Integer?
then define desc also as Integer datatype…
Did you double-check that desc is variable with the type ‘Text’?
ahmedsa
September 6, 2012, 10:04am
6
concrete no found only on reservation schedule with data type code
and customer no is code data type and desc variable is code data type
Hi,
That doesn’t make allot of sense. A possible thing could be is that there’s another variable with the same name but a different datatype. E.g. It’s possible that ‘desc’ is a global variable of type ‘Code’ but in the function that you’re writing your code you’ve got a local variable of type integer.
what is the primary key of reservation scheduale table?
where is the cursor pointing after error?
ahmedsa
September 6, 2012, 11:05am
9
Line No is primary key of reservation scheduled
the cursor give error after this line
(cursor)IF cust.GET(“Sell-to Customer No.”)THEN
desc22:= cust.“Concrete No.” ;
Then how can you get reservation scheduale record with sales Line “Sell-to Customer No.”?
Please read help regarding GET function.
What is the relation between sales Line and reservation scheduale tables?
ahmedsa
September 6, 2012, 11:28am
11
The link between two table is “sell to customer no”
IF Line no is your primary key then you can not use GET function.
You need to use Setfiliter/setrange
So you will have only one record per sell to customer no or multiple records also in reservation scheduale table?
ahmedsa
September 6, 2012, 11:37am
14
Can you tell me how i write this code
please help me.
Cust.SetRange(Cust.“Sell to Customer No”,“Sell to Customer No”);
IF CUST.Find(’-’) THEN
desc22:= cust.“Concrete No.” ;
ahmedsa
September 6, 2012, 3:22pm
17
OK i thanks to reply but when i write this code it no error show and display concrete no field but repeated to all records why
actually found in two record but it show in all records in report
desc22:=’’;
Cust.SetRange(Cust.“Sell to Customer No”,“Sell to Customer No”);
IF CUST.Find(’-’) THEN
desc22:= cust.“Concrete No.” ;