Hello Experts,
I have prepared the rdlc report. i want to show the no. of copies option in this report.
always it is showing the error. Please give some idea to create a report in nav 2016. I am using
the below data items.
*This post is locked for comments
I'm having the same issue.. can you help me pls?
Dear Sir,
Without support it was not possible for me.
very thanks.
Great news, well done!!
Now, It is resolved Sir.
Hi MKY,
I can't see the indentation property on your data items so just to make sure:
Posted Whse. Receipt Header: Indentation = 0
CopyLoop: Indentation = 1
Posted Whse. Receipt Line: Indentation = 2
After you executed the report can you go the Help/About this page (CTRL+ALT+F1) and see if your dataset looks similar to what I posted before? Can you share a screenshot of that?
In the report layout after you created your tablix and group, make sure you insert the new lines inside the group with the Insert Row/Inside Group option.
Dear Sir,
I have followed your suggestion but its always comes single print. I have attached the property of data item. I thing there is some problem in data item property . Plz look in it.
Data Items are below:
Expanded Data Type Data Source Name Include Caption
1 DataItem Posted Whse. Receipt Header <Posted Whse. Receipt Header> No
0 Column "Posted Whse. Receipt Header"."No." No No
0 Column "Posted Whse. Receipt Header"."Posting Date" PostingDt No
1 DataItem Integer CopyLoop No
0 Column NoOfLoops Loops No
1 DataItem Posted Whse. Receipt Line <Posted Whse. Receipt Line> No
0 Column "Posted Whse. Receipt Line"."No." WhsNo No
0 Column "Posted Whse. Receipt Line"."Line No." lineno No
0 Column "Posted Whse. Receipt Line"."Item No." ItemNo No
0 Column "Posted Whse. Receipt Line".Quantity Qty No
0 Column "Posted Whse. Receipt Line".Description ItDesc No
0 Column "Posted Whse. Receipt Line"."Variant Code" Variant No
0 Column Lotno LotNo No
The codes are below:
OnInitReport()
OnPreReport()
OnPostReport()
Posted Whse. Receipt Header - OnPreDataItem()
Posted Whse. Receipt Header - OnAfterGetRecord()
NoOfLoops:=0;
Posted Whse. Receipt Header - OnPostDataItem()
CopyLoop - OnPreDataItem()
SETRANGE(Number,1,NoOfCopies+1);
CopyLoop - OnAfterGetRecord()
NoOfCopies+=1;
CopyLoop - OnPostDataItem()
Posted Whse. Receipt Line - OnPreDataItem()
Posted Whse. Receipt Line - OnAfterGetRecord()
RecItem.RESET;
RecItem.SETRANGE("No.","Posted Whse. Receipt Line"."Item No.");
IF RecItem.FIND('-') THEN BEGIN
//intSNo+=1;
txtItem:=RecItem.Description;
END;
recWhsEntry.RESET;
recWhsEntry.SETRANGE("Entry Type",recWhsEntry."Entry Type"::"Positive Adjmt.");
recWhsEntry.SETRANGE("Whse. Document No.","Posted Whse. Receipt Line"."No.");
recWhsEntry.SETRANGE("Source Line No.","Posted Whse. Receipt Line"."Source Line No.");
recWhsEntry.SETRANGE("Source No.","Posted Whse. Receipt Line"."Source No.");
recWhsEntry.FINDFIRST;
Lotno:= recWhsEntry."Lot No.";
Posted Whse. Receipt Line - OnPostDataItem()
Output are:
Plz help me to resolve it sir.
Hi MKY,
I created a report based on the same tables.
This is the data item link property from the Receipt Line: No.=FIELD(No.)
Here is the code:
I added NoOfLoops and NoOfCopies with type Integer to the Global Variables.
When I run the report:
I get this data:
As you can see I have the original and three copies and the three lines on the warehouse receipt are repeated.
In the RDLC Layout I created a table with one group:
This is the output:
I hope this helps.
Hi,
Can you share your report as a txt file?
Dear Sir,
I am unable to resolve it...
the code is below
Posted Whse. Receipt Header - OnPreDataItem()
Posted Whse. Receipt Header - OnAfterGetRecord()
Posted Whse. Receipt Header - OnPostDataItem()
CopyLoop - OnPreDataItem()
NoOfLoops := ABS(NoOfCopies) + 1;
IF NoOfLoops <= 0 THEN
NoOfLoops := 1;
CopyText := '';
SETRANGE(Number,1,NoOfLoops);
OutputNo := 1;
CopyLoop - OnAfterGetRecord()
IF Number > 1 THEN BEGIN
CopyText := Text003;
OutputNo += 1;
END;
CurrReport.PAGENO := 1;
CopyLoop - OnPostDataItem()
<IntegerHeader> - OnPreDataItem()
<IntegerHeader> - OnAfterGetRecord()
PWRL.RESET;
PWRL.SETRANGE("No.", PWRL."No.");
//PWRL.FINDFIRST;
InitVariables;
<IntegerHeader> - OnPostDataItem()
Posted Whse. Receipt Line - OnPreDataItem()
Posted Whse. Receipt Line - OnAfterGetRecord()
RecItem.RESET;
RecItem.SETRANGE("No.","Posted Whse. Receipt Line"."Item No.");
IF RecItem.FIND('-') THEN BEGIN
//intSNo+=1;
txtItem:=RecItem.Description;
END;
recWhsEntry.RESET;
recWhsEntry.SETRANGE("Entry Type",recWhsEntry."Entry Type"::"Positive Adjmt.");
recWhsEntry.SETRANGE("Whse. Document No.","Posted Whse. Receipt Line"."No.");
recWhsEntry.SETRANGE("Source Line No.","Posted Whse. Receipt Line"."Source Line No.");
recWhsEntry.SETRANGE("Source No.","Posted Whse. Receipt Line"."Source No.");
recWhsEntry.FINDFIRST;
Lotno:= recWhsEntry."Lot No.";
Posted Whse. Receipt Line - OnPostDataItem()
InitVariables()
// Initialize Variables
RecNo := '';
//RecDt := '';
ItemNo := '';
Qty := 0;
ItemDesc := '';
lineno := '';
ItDesc := '';
Lotno := '';
VariantCD := '';
Help me to resolve it.
HI MKY,
Did you check the tutorial video I linked for you previously?
In that video at 9:10 you can see how the copyloop is done.
Sohail Ahmed
2
mmv
2
Amol Salvi
2