0

I have been researching how to do this. It looks like I can name the DocumentMapLabel for a matrix item, in an SSRS report. I can then create basically a hyperlink to that matrix, in another item (such as another cell in another matrix). What I can't seem to figure out, is how to get the dynamic page number to also be computed. It would seem if you could have page numbers in the footer, then SSRS is capable of calculating a page number. I want to get the page number, that the beginning of a matrix or tablix starts at.

Is this something that can be done?

Thanks!

aduguid
  • 3,099
  • 6
  • 18
  • 37
missscripty
  • 529
  • 2
  • 11
  • 30
  • Have you tried referencing a report item that has the page number value? =ReportItems("txtPageNumber").Value – aduguid Mar 19 '18 at 03:29
  • Thank you for the responses. I can try to post a screen shot, but I don't really work in XML, so I don't know how that would help. I will try that ReportItems("txtPageNumber").Value trick and see if it works. I haven't see that solution before. Thanks for responding! – missscripty Mar 19 '18 at 13:00
  • The ReportItems will reference any control in your report. FYI, the .rdl report files are all in XML. You can view the XML in Visual Studio. I use that to copy report variables from one report to another without having to use the UI. – aduguid Mar 19 '18 at 13:06
  • So I found this https://learn.microsoft.com/en-us/sql/reporting-services/report-design/add-a-bookmark-to-a-report-report-builder-and-ssrs . I'm ok with abandoning the need for page numbers. This bookmarking works, but only on the SSRS report. Once I render to PDF, those links don't work, and I would like them too. The document map works, in adding bookmarks to the PDF, but I would like a TOC table in the body of the report. – missscripty Mar 20 '18 at 14:43
  • I have an example of where I use bookmarks as a TOC; I'll post it tomorrow. – aduguid Mar 20 '18 at 15:55
  • Thanks. I used a workaround for now. I did the following - I have a tablix TOC, with bookmark actions, so in SSRS (browswer) you have that TOC. It does not print when rendered to PDF, intentionally (expression to not include it). I also have the document map tagged, so that the rendered pdf has the bookmarks pane, with the sections linked and clickable. It's not ideal, but it works and will be good enough for the team that needs it. – missscripty Mar 20 '18 at 19:33
  • It looks like I added a separate tablix for the TOC and grouped the column I used for the document map then added the bookmark to the textbox. – aduguid Mar 21 '18 at 01:06
  • Interesting workaround. Does that work when rendered to PDF? – missscripty Mar 21 '18 at 12:01
  • I'll give it a go tomorrow morning when I'm in the office. I haven't actually checked it in PDF, but I'm pretty sure it works in Excel. – aduguid Mar 21 '18 at 12:07
  • Yeah, We instruct users to use the disk save drop down, and choose pdf, as using the browser --> print to pdf can be hard to control if they use different pdf print drivers. – missscripty Mar 21 '18 at 15:28
  • It works in Excel, but not in the pdf file. – aduguid Mar 21 '18 at 22:32
  • Yeah. Fortunately the document map works in PDF, so I'll have to use that. – missscripty Mar 22 '18 at 12:04
  • I had to build a console app in C# to do this. Using PDFSharp nuget. – KeithL Nov 01 '22 at 15:34

0 Answers0