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!!
0
Comments
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
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.
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...
http://www.mibuso.com/dlinfo.asp?FileID=1123
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
What about my suggestion of calling a NAV Web Service from the Report itself?
http://www.mibuso.com/dlinfo.asp?FileID=1123
Can't save in the table as in classic nav....
http://www.mibuso.com/dlinfo.asp?FileID=1123
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....or use the classic from the RTC...
http://www.mibuso.com/dlinfo.asp?FileID=1123