Q : report which will create 100 purchase orders, 100 sales orders for same vendor and same item for testing
hi good morning one and all
the above shown is my question
i have tried as shown below
i have taken dataitem
purchase header
global variables as
purchase line as record type
linecount of integer type
in on afterget record i have written the code
pline.RESET;
linecount :=0;
pline.INIT;
IF NOT pline.FINDLAST THEN
pline."Line No." :=linecount+1
ELSE
pline."Line No." :=pline.Type::Item;
pline."Document Type" :="Purchase Header"."Document Type";
pline.INSERT;
it was throwing an error
can you suggest me the code
thank you
0
Comments
:?: :?: :?:
http://www.BiloBeauty.com
http://www.autismspeaks.org
again i am getting the same error
can you suggest how can i solve this problem
pline."Line No." :=linecount+1
instead add
linecount:=linecount+1;
pline."Line No." := linecount;
what you have suggested i have done
now my code is like this as shown below ...even though i am getting the same error
pline.RESET;
linecount :=0;
pline.INIT;
IF NOT pline.FINDLAST THEN
BEGIN
linecount:=linecount+1;
pline."Line No." := linecount;
END
ELSE
//pline."Line No." :=pline.Type::Item;
pline."Document Type" :="Purchase Header"."Document Type";
pline.INSERT;
if it doesn't find a line you are making the line #1
if it does find a line where are you setting the next line #?
plus without an end; at the bottom don't you run into a compiling error?
as well as end else? end else begin should bw the code
http://msdn.microsoft.com/en-us/library/dd338872.aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org