use of Integer Data Item in Report

mkpjsrmkpjsr Member Posts: 587
Hi all,

I have seen Integer data item in most of the navision Reports. I want to know ---

1. How one should use integer data item.
2. what is the impact of indenting one Integer Data Item under another Integer Data Item as so on.

3. How to control repeatation of content on Integer Data Item, is SETRANGE(Number,1,UserDefinedNumber) enough for it

Comments

  • kinekine Member Posts: 12,562
    Just search the forum. There are enough posts about this subject.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Or better...

    why not just look at the code in these reports and see what they are doing and why. if you need tutorials and hand holding, speak with your senior who will organize training for you.
    David Singleton
  • mkpjsrmkpjsr Member Posts: 587
    Actually I want to print multiple copies of Excise Invoice (Id: 16593) Report, so I am trying to do this as It has been done in report Sales Invoice (id:206) and I am writing the following code under IntegerHeader - OnPreDataItem()

    NoOfLoops := ABS(NoOfCopies) ;
    IF NoOfLoops <= 0 THEN
    NoOfLoops := 1;
    CopyText := Text100;
    SETRANGE(Number,1,NoOfLoops);

    and under IntegerHeader - OnAfterGetRecord()


    IF Number =2 THEN
    CopyText := Text200;
    IF Number =3 THEN
    CopyText := Text300;
    IF Number =4 THEN
    CopyText := Text400;

    but the report is showing only the first page...
  • kinekine Member Posts: 12,562
    Ad how you are setting the NoOfCopies?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mkpjsrmkpjsr Member Posts: 587
    kine wrote:
    Ad how you are setting the NoOfCopies?

    I am taking it as input from request form.
  • ssinglassingla Member Posts: 2,973
    The printing is controlled by MaxIteration property of the dataitem "IntegerHeader".
    CA Sandeep Singla
    http://ssdynamics.co.in
  • mkpjsrmkpjsr Member Posts: 587
    ssingla wrote:
    The printing is controlled by MaxIteration property of the dataitem "IntegerHeader".

    If i am changing MaxIteration property to 4 then other Integer Sections are not printing properly,
    Interger (1) Header and body is printing at the bottom. Only the first page is perfectly printed and rest three pages are disturbed.
  • ssinglassingla Member Posts: 2,973
    Write the following code on trigger "On After Get Record" of IntegerHeader dataitem.
    IF CurrReport.PAGENO<>1 THEN
      CurrReport.NEWPAGE;
    
    CA Sandeep Singla
    http://ssdynamics.co.in
  • mkpjsrmkpjsr Member Posts: 587
    ssingla wrote:
    Write the following code on trigger "On After Get Record" of IntegerHeader dataitem.
    IF CurrReport.PAGENO<>1 THEN
      CurrReport.NEWPAGE;
    


    Thanx for the reply,
    still, the second page's sections are not displayed properly. Rest three pages, page 1,3 and 4 is perfect. what is the reason
  • ssinglassingla Member Posts: 2,973
    It is working properly here. The only thing needed was to initialize certain variables but format is correct. Check whether you have made some other changes to the report?
    CA Sandeep Singla
    http://ssdynamics.co.in
  • mkpjsrmkpjsr Member Posts: 587
    ssingla wrote:
    The only thing needed was to initialize certain variables but format is correct. Check whether you have made some other changes to the report?

    I have not made any changes in the code,still i am facing the same problem.

    If we look at the report 206 (Sales-Invoice) it has CopyLoop and PageLoop Integer data items.
    And in this report code is written under CopyLoop and the report is designed in PageLoop data item section's. why they are using two Integer data items, is not one Integer DataItem sufficient for that? As in excise invoice report there is IntegerHaeder on which we are doing the whole or I should use Integer1 data item also.
  • mkpjsrmkpjsr Member Posts: 587
    can anybody guide me??
  • geronimogeronimo Member Posts: 90
    mkpjsr wrote:
    ssingla wrote:
    The only thing needed was to initialize certain variables but format is correct. Check whether you have made some other changes to the report?

    I have not made any changes in the code,still i am facing the same problem.

    If we look at the report 206 (Sales-Invoice) it has CopyLoop and PageLoop Integer data items.
    And in this report code is written under CopyLoop and the report is designed in PageLoop data item section's. why they are using two Integer data items, is not one Integer DataItem sufficient for that? As in excise invoice report there is IntegerHaeder on which we are doing the whole or I should use Integer1 data item also.
    the reason there are 2 integer loops is:
    - copyloop to iterate the total number of copies
    - pageloop to set the format correctly (for the pages with the header sections) as you cant use an integer as a top level for a document as you cant pass a record along to the report in a standard way (like report.runmodal(50000,Rec)

    if the design of page 2 is faulty then this means some sections are printed too much or not printed. just look at what the reason is some sections arent printed (maybe adding in a caption box with a number in the sections and previewing the report to see what is missing or too much will be the fastest way)
  • navuser1navuser1 Member Posts: 1,329
    geronimo wrote:
    if the design of page 2 is faulty then this means some sections are printed too much or not printed. just look at what the reason is some sections arent printed (maybe adding in a caption box with a number in the sections and previewing the report to see what is missing or too much will be the fastest way)

    I have made the changes as required in the Classic client (R2 version) and It's working fine. But it Prints Extra page( Page No 2, Without any data) in RDLC Report Output..

    What could be the cause :-k :-k ??
    Kindly Reply..
    Now or Never
  • SogSog Member Posts: 1,023
    Why do you ask the same question when you have a topic open in 3-tier?
    My rule of thumb with rdlc reports with pages being printed too much is to check the dataset being sent to the rdlc report to see if the problem is datawise (too much data being sent) or layoutwise (a missing or misplaced check if data should be printed or not, needed for totalling lines.)
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
Sign In or Register to comment.