Options

RTC Report Problem (multiple print)

stonystony Member Posts: 122
edited 2012-05-16 in NAV Three Tier
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

  • Options
    ara3nara3n Member Posts: 9,255
    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    stonystony Member Posts: 122
    I changed it but the problem is still the same.
  • Options
    ara3nara3n Member Posts: 9,255
    did you change the property on integer dataitem called max iteration? or added a filter property?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    stonystony Member Posts: 122
    No. See the screenshot.
  • Options
    ara3nara3n Member Posts: 9,255
    could you export your report as text and paste it in here?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    stonystony Member Posts: 122
    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 {
  • Options
    ara3nara3n Member Posts: 9,255
    i dont think the whole text object is pasted.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    stonystony Member Posts: 122
    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?
  • Options
    ara3nara3n Member Posts: 9,255
    Yeah Send You can upload it somewhere and give me a link. Or email it. I've sent you my email.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    deV.chdeV.ch Member Posts: 543
    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.
  • Options
    stonystony Member Posts: 122
    Did the report accordingly (list box) changed. The first line of the sales order is now processed correctly, but the following are not processed.
    The screenshot shows the group properties.
  • Options
    deV.chdeV.ch Member Posts: 543
    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!
  • Options
    stonystony Member Posts: 122
    Ok. Now it works.
    Thank you and I will follow your advice.
Sign In or Register to comment.