解决方案:Page numbers appear as question marks in HTML- sample report to work around issue. Technote (troubleshooting) Problem(Abstract) Clicking on the page down link in an HTML report results in page numbers of the form "1 of...
显示全部解决方案:
Page numbers appear as question marks in HTML- sample report to work around issue.
Technote (troubleshooting)
Problem(Abstract)
Clicking on the page down link in an HTML report results in page numbers of the form "1 of ?". In other formats, this issue does not occur. The reason for this is that reports run in HTML format are page on demand meaning that we pull back just enough data to display on the requested page. When the page-down link is clicked, we pull back data for the next page and so forth. Therefore, we do not know the total number of pages in the report.
If the report consists of a list with the left most item grouped and all rows for each element of the grouped item are to appear on a single page, there is a work around to this issue. This document contains a sample report where this is done and steps on how to create this report.
Cause
Since HTML reports are page on demand, we do not know the total number of pages in the report on the fly.
Resolving the problem
The assumptions in this document are that we are working with a list report with the left most item grouped and each element in the grouped item is displayed on a single page. We can then perform calculation to count the total number of pages and the page number associated with each element of the grouped item.
Steps:1. Add "Product line", "Product type", "Order method" and "Revenue" to a list. (Query entitled "Main" in the sample attached).
2. Group "Product line".
3. Create a new query (called "PageBreaker" in the sample) and add product line to it.
4. Add a data item called "TotalcountProdline" to query "PageBreaker" and define it as:
count ([gosales_goretailers].[Products].[Product line] for report)
5. Add a data item called "RunningcountProdline" to query "PageBreaker" and define it as:
running-count ([gosales_goretailers].[Products].[Product line])
6. Go the Page Explorer and click on "Report Pages".
7. Add a page set under "Page 1".
8. In the properties for the page set, set the "Query" property to the "PageBreaker" query.
9. Click on the grouping and sorting property for the page set. Add "Product Line" to the "Groups" by dragging it into the folder called "Groups". Click ok.
10. Drag "Page1" into the folder called "Detail pages" under the page set that was created.
11. Go to Page 1 of the report and select the entire list. Go to the "Data" menu and select "Master detail relationships". Create a new link between the two product lines.
12. Select the entire page of the report and associate it to Query "PageBreaker".
13. In the page footer, delete the text item called with definition PageNumber(). Add three text items. Define the first and the third text items to use a report expression and base them on RunningcountProdline and TotalcountProdline. The middle text item can just contain the text "of". Page numbers should now appear as "1 of 5", "2 of 5" etc.
收起