🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.together.documentation
2 messages
2 total messages Started by obuvez Wed, 16 Feb 2005 18:13
How to get the package name in the report header?
#73
Author: obuvez
Date: Wed, 16 Feb 2005 18:13
16 lines
1513 bytes
Hi All,

In the report header, I would like to print the project name if 
"reportScope" == "all_model" and the package name in the other cases. So I 
have created a formula control with the following expression:

if (getDGVariable("reportScope") == "all_model",
getDGVariable("projectName"),
...)

But I don't know which expression I should use insead of ... to get the 
current package name.

Any help will be welcomed.

Regards 
Re: How to get the package name in the report header?
#77
Author: ElenaA
Date: Thu, 17 Feb 2005 14:38
49 lines
2685 bytes
I can suggest using invokeForName function. For example:

if (getDGVariable("reportScope") == "all_model",
getDGVariable("projectName"),
invokeForName("com.togethersoft.modules.out.package2.Adapter1","func1"))

com.togethersoft.modules.out.package2.Adapter1.func1() should be static, and 
should return a String containing name of current package/diagram (depending 
on scope), passed to it as gendoc context. Class 
com.togethersoft.modules.out.package2.Adapter1 should be compiled and placed 
in $TGH/modules/com/togethersoft/modules/out/package2.

The simplest implementation that should do the thing:

package com.togethersoft.modules.out.package2;

import com.togethersoft.modules.gendoc.api.*;
import com.togethersoft.openapi.rwi.RwiElement;
import com.togethersoft.openapi.rwi.RwiProperty;

public class Adapter1 {
    public static String func1(GenDocContext context) {
        RwiElement r = context.getRwiElement();
        String s = r.getProperty(RwiProperty.FULL_NAME);
        return s;
    }
}



"obuvez" <obuvez@voila.fr> wrote in message 
news:42138d3c@newsgroups.borland.com...
> Hi All,
>
> In the report header, I would like to print the project name if 
> "reportScope" == "all_model" and the package name in the other cases. So I 
> have created a formula control with the following expression:
>
> if (getDGVariable("reportScope") == "all_model",
> getDGVariable("projectName"),
> ...)
>
> But I don't know which expression I should use insead of ... to get the 
> current package name.
>
> Any help will be welcomed.
>
> Regards
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads