jantje
5th October 2015, 17:19
I want to add the name of the report in the Header layout, as a variable.
Is this possible? For example with the Form.text$ function r ...?

Now I always add the name as fixed text, but when copying the report this name/text also needs to be changed dynamically.

Thx

bhushanchanda
5th October 2015, 18:37
Hi,

Go to your Header layout in report designer. Edit- > Special Field -> Report Description.

This will add the report name to your layout.

mark_h
5th October 2015, 20:11
And yes - you can have like your own variable for the report header and put that where ever you want. Then you can pass what ever report name you want to the report.

jantje
7th October 2015, 11:09
Hi, thx for answer. But I only see Report description, in special fields, and not the name.
I remember from long ago that I could add it with form.text$ or something, but can't find it anymore.
Any other idea?

bhushanchanda
7th October 2015, 11:31
Hi,

What exactly are you looking for? What you mean by Report Name?

1. Report Code
2. Session Code
3. Session Description

Following is the code snippet to get them. You need to write it in your report script and then use these fields in your Report Layout.

declaration:
extern domain tcmcs.str20 report.code
extern domain tcmcs.str20 session.code
extern domain tcmcs.str100 session.desc
before.program:

report.code = prog.name$

import("prog.name$",session.code)

session.desc = tt.session.desc(trim$(session.code))

jantje
7th October 2015, 11:58
Hi Bhushan,

You solved my problem. It was the reportcode... a predefined variable.
Thanks a lot!