RTC Report Problem (multiple print)

stony
Member Posts: 122
Hallo,
I'd like to print all order lines (from a selected order) as a label. And the number of labels should correspond to the input set in order lines.
In addition I have created the following new report. And the following code is the integer OnAfterGetRecord
What´s wrong.
thanks
stony
I'd like to print all order lines (from a selected order) as a label. And the number of labels should correspond to the input set in order lines.
In addition I have created the following new report. And the following code is the integer OnAfterGetRecord
IF Number > "Sales Line"."Input Quantity" THEN CurrReport.SKIP;The problem is that only the first order line is printed and this only once. The CC report works.
What´s wrong.
thanks
stony
0
Comments
-
you should change your report on integer dataitem add the followig code on predataitem
setrange(Number,1,"Sales Line"."Input Quantity" );
remve the code you added on aftergetrecord.0 -
I changed it but the problem is still the same.0
-
did you change the property on integer dataitem called max iteration? or added a filter property?0
-
-
could you export your report as text and paste it in here?0
-
Yes
-
OBJECT Report 50047 Auftrag-Musteretiketten
{
OBJECT-PROPERTIES
{
Date=14.05.12;
Time=06:34:10;
Modified=Yes;
Version List=;
}
PROPERTIES
{
}
DATAITEMS
{
{ PROPERTIES
{
DataItemTable=Table36;
ReqFilterFields=No.;
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=1;
DataItemTable=Table37;
DataItemTableView=WHERE(Type=CONST(Item));
DataItemLink=Document No.=FIELD(No.);
}
SECTIONS
{
}
}
{ PROPERTIES
{
DataItemIndent=2;
DataItemTable=Table2000000026;
NewPagePerRecord=No;
OnPreDataItem=BEGIN
SETRANGE(Number,1,"Sales Line"."Input Quantity" );
END;
OnAfterGetRecord=BEGIN
{
IF Number > "Sales Line"."Input Quantity" THEN
CurrReport.SKIP;
}
IF Item.GET("Sales Line"."No.") THEN BEGIN
ItemMerkmale.RESET;
ItemMerkmale.SETRANGE(Type,ItemMerkmale.Type::Holzart);
ItemMerkmale.SETRANGE(Code,Item."Et-Holzartencode");
IF ItemMerkmale.FINDFIRST THEN
HolzartEng := ItemMerkmale."Code-ENU"
ELSE
HolzartEng := '';
ItemMerkmale.RESET;
ItemMerkmale.SETRANGE(Type,ItemMerkmale.Type::Qualit„t);
ItemMerkmale.SETRANGE(Code,Item."Et-Qualit„tscode");
IF ItemMerkmale.FINDFIRST THEN
SortierungEng := ItemMerkmale."Code-ENU"
ELSE
SortierungEng := '';
//Holzart und Qualit„tscode als einen Text erstellen
HolzartQualit„tscode := '';
IF Englisch THEN
HolzartQualit„tscode := HolzartEng + ' ' + SortierungEng
ELSE
HolzartQualit„tscode := Item."Et-Holzartencode" + ' ' + Item."Et-Qualit„tscode";
//Profilcude und Farbencode als einen Text erstellen
ProfilFarbencode := '';
IF Item."Profil Code" = 'NF*' THEN
ProfilFarbencode := 'NF '
ELSE
ProfilFarbencode := 'LOC5G ';
ProfilFarbencode := ProfilFarbencode + Item.Farbencode;
END;
END;
}
SECTIONS
{
{ PROPERTIES
{
SectionType=Body;
SectionWidth=12000;
SectionHeight=5076;
}
CONTROLS
{
{ 1000000000;TextBox;5700 ;2961 ;3000 ;423 ;SourceExpr=ProfilFarbencode;
DataSetFieldName=ProfilFarbencode }
{ 1000000001;TextBox;1800 ;2961 ;3000 ;423 ;SourceExpr=HolzartQualit„tscode;
DataSetFieldName=HolzartQualit„tscode }
{ 1000000002;TextBox;2100 ;2115 ;2400 ;423 ;SourceExpr=HolzartEng;
DataSetFieldName=HolzartEng }
{ 1000000003;TextBox;5700 ;2115 ;3000 ;423 ;SourceExpr=SortierungEng;
DataSetFieldName=SortierungEng }
{ 1000000006;TextBox;300 ;2115 ;1500 ;423 ;SourceExpr=Englisch;
DataSetFieldName=Englisch }
{ 1000000004;TextBox;3450 ;1269 ;4500 ;423 ;SourceExpr=Item."Description 2";
DataSetFieldName=Item__Description_2_ }
{ 1000000005;TextBox;3450 ;846 ;4500 ;423 ;SourceExpr=Item.Description;
DataSetFieldName=Item_Description }
{ 1000000007;TextBox;4650 ;0 ;4500 ;423 ;SourceExpr=Item."Profil Code";
DataSetFieldName=Item__Profil_Code_ }
{ 1000000008;TextBox;0 ;0 ;4500 ;423 ;SourceExpr=Item.Oberfl„chentypencode;
DataSetFieldName=Item_Oberfl„chentypencode }
}
}
}
}
}
REQUESTFORM
{
PROPERTIES
{
Width=9020;
Height=3410;
}
CONTROLS
{
}
}
REQUESTPAGE
{
PROPERTIES
{
}
CONTROLS
{
}
}
CODE
{
VAR
Item@1000000000 : Record 27;
Englisch@1000000006 : Boolean;
HolzartEng@1000000005 : Code[20];
SortierungEng@1000000004 : Code[20];
ItemMerkmale@1000000003 : Record 50000;
ProfilFarbencode@1000000002 : Text[50];
HolzartQualit„tscode@1000000001 : Text[50];
BEGIN
END.
}
RDLDATA
{
0 -
i dont think the whole text object is pasted.0
-
Sorry.
The report has, unfortunately, a size of approximately 4 Mb. There are in fact some images embedded in the report. Can I upload the report file?0 -
Yeah Send You can upload it somewhere and give me a link. Or email it. I've sent you my email.0
-
In the layout: Put your textboxes in a list, then set the group property of the list to: "Integer__Number.Value"
Also i would check the "Break after" in the group tab and the "fit to one page if possible" flags.
If you don't add some kind of repeating element in the report layout, your textboxes will only get pritned once.
The Body section only processes it's elements once.0 -
Now you need to add another expression (above the one you ahve) to this grouping that groups on sales header no. / sales line no. so it would like this:
Expressions:
'=Sales_Header__No_.Value'
'=Sales_Line__Line_No_.Value'
'=Integer__Number.Value'
With this your list will group on both.
I also recomend to read more about RDLC and how it works, this is very basic stuff and you are going to use it a lot if you are doing reports!0 -
Ok. Now it works.
Thank you and I will follow your advice.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions