web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to print a title or caption in header of a report only in the page based on particular line item value?

(0) ShareShare
ReportReport
Posted on by 239

Hello experts ,

Good Day !

Could you please suggest how can i get print the caption/title in the header based on particular line item? I have created a text variable example: "Heading" and i have provided the condition in "Sales_Header" dataitem OnAfterGetRecord(). But the problem is it is not printing particularly on that page where condition satisfies it just prints on every page else if i remove repeat until then it will pring only once.

ketek-test.png

Please help !

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    It is very tricky because you have to handle it page-wise because you never know which page that line will appear, you need to try something line Print Totals but also keep track of the pages or add some code to limit the number of lines on the page.  

  • KaryaNavTech Profile Picture
    239 on at

    Hi Suresh thanks, Could you please help me out in this ...as mentioned now i am able to get the no. of lines per page, could you please suggest how could i limit the no. of lines per page in report, further how do i implement my condition to print for specific line item value. Please advice i am stuck here.

  • KaryaNavTech Profile Picture
    239 on at

    Hi suresh, please suggest

  • KaryaNavTech Profile Picture
    239 on at

    Any suggestions :(

  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    Hi,

    As I mentioned it is not a simple logic for me to add in this forum, this requirement is tricky. Just to reiterate you want to print the certain text as heading on that page only when lines on that page satisfy a condition. Correct?

  • KaryaNavTech Profile Picture
    239 on at

    Yes suresh,

    thats what my requirement is. Well thanks for your response if any suggestion or way to this achieve will be appreciable :(

  • ManishS Profile Picture
    86 on at

    Look at standard report 206 Sales Invoice, it print copytext based on the output number of pages.

    You can use that kind of logic for you report. Also look into the layout also.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans