CurrReport.NEWPAGE function in RTC reports

ajaybabuCh
Member Posts: 208
Hi
I have created a simple report with Customer table as Data Item.
Displaying in the Body section a few fields.
I have written the following code in OnAfterGetRecord() of the Customer DataItem to print 4 records per page.
LinesPerPage += 1;
IF LinesPerPage = 5 THEN BEGIN
LinesPerPage := 1;
CurrReport.NEWPAGE;
END;
Once I completed my classic report, I did choose the "Create Layout Suggestion option". I saved layout , save and compiled the report.
I ran the Classic Report ,classic report displays 4 records for each page.
When I run the RTC report, It is not displaying in the same way as classic behaves.
Do I need to write some code in RTC reports to get "CurrReport.NEWPAGE" functionality.
Can anybody help me in this.
Thanks and Regards
I have created a simple report with Customer table as Data Item.
Displaying in the Body section a few fields.
I have written the following code in OnAfterGetRecord() of the Customer DataItem to print 4 records per page.
LinesPerPage += 1;
IF LinesPerPage = 5 THEN BEGIN
LinesPerPage := 1;
CurrReport.NEWPAGE;
END;
Once I completed my classic report, I did choose the "Create Layout Suggestion option". I saved layout , save and compiled the report.
I ran the Classic Report ,classic report displays 4 records for each page.
When I run the RTC report, It is not displaying in the same way as classic behaves.
Do I need to write some code in RTC reports to get "CurrReport.NEWPAGE" functionality.
Can anybody help me in this.
Thanks and Regards
Ajay
0
Comments
-
Yes, this part of classic client report is not transformed into the RDLC. You need to solve it in RDLC... the classic report is only data source for the RTC reporting.0
-
Hi Kine
Can you give example code.
Thanks and RegardsAjay0 -
hi,
To limit no. of lines to be displayed per page in RTC Reports is done by using the celing function in RTC.
Kindly go through its proper format while writing this function.
This will solve your query.0 -
Hi Amol
Thanks for the information.
Still I would like to know how do we force to new page in RTC reports.
Is there any function/property in RTC similar to CurrReport.NEWPAGE.
Thanks and RegardsAjay0 -
Kindly select the body whose line you want to restrict on a perticular page.
Go into its expression and write the CELING function.0 -
Can anybody give some example code to get CurrReport.NEWPAGE feature in RTC reportsAjay0
-
To create a new page number variable to replace the CurrReport.NEWPAGE property
In the Classic client, on the Tools menu, click Object Designer.
In Object Designer, select Report, select the report in which you use the CurrReport.NEWPAGE property, and then click Design.
On the View menu, click C/AL Globals.
In the C/AL Globals window, on the Variables tab, add the following variables.
Name DataType
PageGroupNo
Integer
NextPageGroupNo
Integer
On the View menu, click C/AL Code.
In the C/AL Editor, add the following code to the OnPreDataItem trigger to create and initialize the new page number variable.
Copy Code
IF ISSERVICETIER THEN BEGIN
PageGroupNo := 1;
NextPageGroupNo := 1;
END
For each place in the code where you call the CurrReport.NEWPAGE property in the Classic client, add code to increment the PageGroupNo variable, as shown in the following example.
Copy Code
IF ISSERVICETIER THEN BEGIN
PageGroupNo += 1;
END;
Note
You cannot add the line of code to section triggers. If you use the CurrReport.NEWPAGE property in a section trigger, then you must add the line of code to increment the PageGroupNo variable to a DataItem trigger instead.
On the View menu, click Sections.
Add a text box where the SourceExpr value is PageGroupNo. Add another text box where the SourceExpr value is NextPageGroupNo. Set both text boxes to be hidden. For more information, see How to: Add and Identify Hidden Fields.
Save and compile the report. For more information, see How to: Integrate Classic Client Report Designer and Visual Studio Report Designer.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