Report in Role Tailored: can return the number of pages?

MC
Member Posts: 19
Hello everybody!
We are designing 2 different reports to use in the role tailored version, so we have created a Layout in Visual studio.
We have a third report without layout because it's only a process (called from role tailored too). We're going to call the first two reports from the third report.
We need to know the number of pages of the first report to pass the number of pages + 1 to the second report (to use as the first page)
How can we obtain the number of pages of a report printed in Role Tailored?
The classic version has the [CurrPageNo] := PAGENO([NewPageNo]) function, but we are in role tailored and layout design.
Please, can anybody help us?
Thanks a lot!!
We are designing 2 different reports to use in the role tailored version, so we have created a Layout in Visual studio.
We have a third report without layout because it's only a process (called from role tailored too). We're going to call the first two reports from the third report.
We need to know the number of pages of the first report to pass the number of pages + 1 to the second report (to use as the first page)
How can we obtain the number of pages of a report printed in Role Tailored?
The classic version has the [CurrPageNo] := PAGENO([NewPageNo]) function, but we are in role tailored and layout design.
Please, can anybody help us?
Thanks a lot!!
0
Comments
-
Hi,
This expression, placed in a text box in the footer of a report, provides page number and total pages in the report.
=Globals.PageNumber & " of " & Globals.TotalPages
This is described in the online help topic: http://msdn.microsoft.com/library/ms251716.aspx
Cheers,
David“This posting is provided "AS IS" with no warranties, and confers no rights.”0 -
Thanks David,
But I not only want to print the number of pages in role tailored version.
Maybe I didn't explain correctly.
I have three reports, one report doesn't print (report 1), it only calls the other two reports (report 2 and report 3)
I need to know the number of pages (numPages) of the report 2 because report 1 needs this value in order two call report 3, and tell him that the first page is numPages +1.
This is very simply in the classic version, because Currreport.PageNo returns the number of pages. But this expression in the Visual studio layout can't return a value to report 1, designed in classic version.
How can I do?
Thanks a lot.0 -
I'm afraid MC but that cannot be done... Once you print the layout of the report you have no connection back to the NAV database so you can't report back to the other processing only report the last printed page number...
The only way I see if you want to automate the process is to call a NAV web service to return back the number of the last printed page but... I tried and I wasn't able because of permission problem...Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
Hi,
OK I understand the problem now. Unfortunately, I don't know of any way to return the number of pages from the report viewer after it has rendered the report. The total number of pages would also depend on how the report was rendered by the report viewer (in preview mode or interactive mode).
Regards,
David“This posting is provided "AS IS" with no warranties, and confers no rights.”0 -
David,
What about my suggestion of calling a NAV Web Service from the Report itself?Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
Well you can't do that without a web service or another way of communication...
Can't save in the table as in classic nav....Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230 -
Hi all, and thank you very much for your time,
I thought about save the number of pages in a table, but this is a think that I only can do in classic version. Can I do this with web services? My customer needs a special licence to use a web service?
I think we have lost this funcionality with the role tailored version.
Another possibility it's that "report 2" calculates the number of pages in OnPostDataItem or in OnAfterGetRecord, considering number of records, the possible space of the Headers, GroupHeaders,Footers, GroupFooters. I think it's a mess, but the only solution if I don't want (or don't know how) to use web services.0 -
MC wrote:Hi all, and thank you very much for your time,
I thought about save the number of pages in a table, but this is a think that I only can do in classic version. Can I do this with web services? My customer needs a special licence to use a web service?
I think we have lost this funcionality with the role tailored version.
Another possibility it's that "report 2" calculates the number of pages in OnPostDataItem or in OnAfterGetRecord, considering number of records, the possible space of the Headers, GroupHeaders,Footers, GroupFooters. I think it's a mess, but the only solution if I don't want (or don't know how) to use web services.
Yes it would be a messy solution...using web services from NAV to call NAV functionality should be "free" and in the licence but it is not an easy route....
Otherwise you would have to let the user select the last printed page manually in the second report....oruse the classic from the RTC...
Why don't you try my compare tool?
http://www.mibuso.com/dlinfo.asp?FileID=11230
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