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
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
Comments
setrange(Number,1,"Sales Line"."Input Quantity" );
remve the code you added on aftergetrecord.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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 {
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
The screenshot shows the group properties.
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!
Thank you and I will follow your advice.