proplem to display value from line in header section

hi guys i have report based on

sales invoice header

and sales invoice line

this report as following

shipment date description unit price quantity amount invoice no(found in sales invoice line table)

12/03/2012 src 28 mpa 12 2 24 15

12/02/2012 src 15 mpa 12 5 60 15

12/01/2012 src 30 mpa 12 20 240 15

what i need is display invoice no in header of invoice(meaning display invoice no in salesinvoiceheader,header) section

meaning the first section in page

when i put this field of invoice no in header section of sales invoice line not show any thing i want to display this in sales invoice header table in header section to prevent repeating


invoice no according to my implementation represent field named crossrefernceno in sales inoice line

please help me


You would use the “No.” field of the invoice header table

you means that i replace crossrefernceno field with No filed of sales invoice header table


Let me clear my self. You are going to make a report with two data item. you want a field from line lvl to be printed in header.

Like reference no. Is this no unique, ie same for all the lines with respect to header.

try buy giving a field in header. like Salesline.Reff no.

or you can do another thing like create one Rec variable Called salesLine2Rec .

Give appropriate filters. Find first in the onafter get record section of the header.

Give a field in headers header like SalesLine2Rec.reff no

Hope this will give you the required results

hi prajeesh this number is unique i make as following go to salesinvoiceheader table then create field named cross1then create variable name

salesLine2Rec record salesinvoiceline table in c/al global then

on after get record of sales invoice header i write this code
cross1:=salesLine2Rec.“Cross-Reference No.”;

then i got sales invoice header,header1 then put cross1 field put no result

In sales Invoice header on after get record you write like this

SalesInvLine2Rec.SETRANGE(SalesInvLine2Rec.“Document No.”,“Sales Invoice Header”.“No.”);
if SalesInvLine2Rec.FINDFIRST then
cross1:= salesLine2Rec.“Cross-Reference No.”;

[Message(’%1’,cross1)] still not getting try to give a message here.

[Message(’%1-sales Inv Line’,salesLine2Rec.“Cross-Reference No.”)]

[Message(’%1-sales Inv Header’,“Sales Invoice Header”.“No.”)]

still if you are not getting the desired result go to the particular invoice in history or order processing if its not posted. Check the first line have any cross reference in it?

go to the first line press ctrl F8. so you check easily buy pressing C to go next field it will start with C.

check the Global Variable make sure you are using the sales Invoice line itself.

if you are trying to get some field from sales line then its not possible directly you have shipment No in sales Invoice Line.

Take that no get the posted shipment table(Header) there you will find the order no with that no you can find the appro. Sales Line and take the field.

But this has a functional issue. A Sales invoice can have different Shipement Lines according to the customer you are having in sales invoice header.

This you can see through the functions–> Get shipment Lines

so different sales orders have different Cross Reference nos.

WOW … [:O]

You said you needed the invoice number. In the Sales Invoice Header table, that value is stored in the “No.” field. You don’t need to write any code to retrieve anything, that field is available in the Sales Invoice Header dataitem, and you can put it straight in a header section that belongs to the dataitem.

The Cross Reference number on the line refers to a cross reference for the ITEM on the line, and this has nothing to do with the invoice number.

OK good i understand what you say but if i want to filter one customer to specific period date

ex: if i have customer A and i want to filter them between two period from 15/01/2012 to 15/03/2012 how i give them number to be marked as invoicing

I don’t understand your question. Are you still talking about a field in the header of a report or about invoicing?

For invoicing you already answered your own question.
goto batch post - set your Filters (specific customer - “Sell-to Customer No.”, Date Range ( setfilter on Posting date, order date, whichever you’re looking for) post.
It will only post orders within your filters , no need to “mark” them unless you mean something completely different.

i goted now what you say you are right but situation in my implementation already found since two years based on crossrefernce no in sales invoice line in every customer betweeen two dates it take unique value but my question here can i put another field have unique value in header section from sales invoice line how can i write code to make this i know i ask more question but this last

another point to understand

thank you

ok thanks