Instead of "STRSUBSTNO(Text004,CopyText)" in the textbox, put a variable and in the "OnPreReport"-trigger fill it up with the value you want.
(I hope I understood your question correctly)
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks kriki for your reply, but I think than it's no useful for me.
My problem is that I'm printing this document as pdf, and the name that it suggests when I will save the file is the CaptionML value of the report and I would like to change for a field of the record that will be printed.
You could try to use the System Table 2000000001 Object to modify the name of the object, before printing to PDF.
recObject.SETRANGE(Type,recObject.Type::Report);
recObject.SETRANGE(ID,205);
IF recObject.FIND('-') THEN BEGIN
recObject.Name := 'New Name';
recObject.MODIFY;
IF CONFIRM(recObject.Name) THEN;
END;
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
This code seems to be a very good, but I don't know how it works. I put in the OnPrereport trigger, and works correctly, change de recObject.name y show it, but the filename still being the original CaptionML value. I try to change recObject.caption but it seems be a Flowfield, and I can't change it.
What about overriding the CaptionML property to a name you desire? Make sure you make the change in the language you are actually using the database with (Tools --> Language...)
Comments
(I hope I understood your question correctly)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
My problem is that I'm printing this document as pdf, and the name that it suggests when I will save the file is the CaptionML value of the report and I would like to change for a field of the record that will be printed.
This code seems to be a very good, but I don't know how it works. I put in the OnPrereport trigger, and works correctly, change de recObject.name y show it, but the filename still being the original CaptionML value. I try to change recObject.caption but it seems be a Flowfield, and I can't change it.
Perhaps this cannot be done.
Greetings
I trying with your last suggestion but the report still giving the old name ](*,)
I'm begining to think that navision not permit this. Caption on the report is not a property that could access from C/AL Symbol Menu
greetings
Microsoft Dynamics NAV Developer