cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Jasper Reports and ECN attributes

Iblackie
12-Amethyst

Jasper Reports and ECN attributes

Hello,
Using Jaspersoft studio 6.20.5 I cannot see any of my custom attributes inside of the Jasper studio when I add a field or parameter,  How do I make the relation between the studio template and Windchill 12.0.2 attributes.  I am able to hook up my PC with Jasper studio and connect Windchill to see the preview of an ECN using the OOTB Jasper template, it works fine. I just cannot see any custom attributes to add to fields or parameters when I edit the template.
Any input would be appreciated, PTC supports stops at the point where you establish connection and Jasper community has virtually no one with Windchill expertise.  I am hoping someone here has gained some expertise to share within this community.
PTC is apparently going to add some training material in October, i can't wait that long.

Thanks in advance.

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
Iblackie
12-Amethyst
(To:Iblackie)

Hi all that are interested,
So I'm answering my own thread here.
There are a few things that need to be understood to get this working.

The table that has the fields needs to be connected to the correct dataset that contains the attributes, in this case it is the DatasetForCNSoftAttr.
Inside of this dataset you'll find your soft attributes you have created for your ECNs (or ECN subtype in my case). For this example I decided to use a soft attribute "ECO type" to replace the OOTB "Complexity" attribute that is too rigid for our needs.

Using OOTB Jasper Reports Template from Windchill 12.0.2.1 , "Change Notice Summary Report.jrxml" in the jasper studio community edition.
This is the table for soft attributes

Iblackie_0-1694179060511.png

 

ECN attribute "ECO Type" and its value is "Pre-Incorporated." , other user defined attributes exist in the ECN as well, without editing, all attributes are shown.  

Iblackie_1-1694179060514.png

 

To filter those out, in the OOTB Template use this in the NAME text field: Where "ECO type" is the display name not the internal name of the attribute

$F{NAME}.equals("ECO type") ? $F{NAME} : ""

Iblackie_2-1694179060515.png

 

Use this to filter the VALUE text field:

$F{NAME}.equals("ECO type") ? $F{VALUE} : ""

Iblackie_3-1694179060515.png

 

To hide the rows that do not match the criteria because their results will be null (empty), add this to the Detail Properties within the specific Table.

Iblackie_5-1694179700705.png

Print When Expression: $F{NAME}.equals("ECO type") 

Iblackie_4-1694179060516.png

I have posted a similar reply in the Jasper Wiki as well.
https://community.jaspersoft.com/wiki/how-hide-table-row-based-conditional-expression 

View solution in original post

4 REPLIES 4
jbailey
17-Peridot
(To:Iblackie)

Not a solution for you, but commiserate with you on PTC support ending as soon as you connect Jasper. PTC's support for reporting in general just plain sucks. They expect that if you need a report, you've a big corporation that has reporting experts that can just instantly understand PTC's data model and spit out reports... 

aacciano3
14-Alexandrite
(To:Iblackie)

@Iblackie 

I am not sure if this article is of any help:

https://www.ptc.com/en/support/article/CS364883

If you are not aware of it, there is a knowledge hub at this link:

Article - CS332405 - [Knowledge Hub] Windchill PLM - Jasper Report (ptc.com)

 

Iblackie
12-Amethyst
(To:aacciano3)

Thank you for the links, they are helpful for many things related to Jasper but don't specifically answer my question.
I will keep the Knowlege Hub in my back pocket for future reference. 
I will add my findings to this thread as I have made some progress on my own.
Ian

Iblackie
12-Amethyst
(To:Iblackie)

Hi all that are interested,
So I'm answering my own thread here.
There are a few things that need to be understood to get this working.

The table that has the fields needs to be connected to the correct dataset that contains the attributes, in this case it is the DatasetForCNSoftAttr.
Inside of this dataset you'll find your soft attributes you have created for your ECNs (or ECN subtype in my case). For this example I decided to use a soft attribute "ECO type" to replace the OOTB "Complexity" attribute that is too rigid for our needs.

Using OOTB Jasper Reports Template from Windchill 12.0.2.1 , "Change Notice Summary Report.jrxml" in the jasper studio community edition.
This is the table for soft attributes

Iblackie_0-1694179060511.png

 

ECN attribute "ECO Type" and its value is "Pre-Incorporated." , other user defined attributes exist in the ECN as well, without editing, all attributes are shown.  

Iblackie_1-1694179060514.png

 

To filter those out, in the OOTB Template use this in the NAME text field: Where "ECO type" is the display name not the internal name of the attribute

$F{NAME}.equals("ECO type") ? $F{NAME} : ""

Iblackie_2-1694179060515.png

 

Use this to filter the VALUE text field:

$F{NAME}.equals("ECO type") ? $F{VALUE} : ""

Iblackie_3-1694179060515.png

 

To hide the rows that do not match the criteria because their results will be null (empty), add this to the Detail Properties within the specific Table.

Iblackie_5-1694179700705.png

Print When Expression: $F{NAME}.equals("ECO type") 

Iblackie_4-1694179060516.png

I have posted a similar reply in the Jasper Wiki as well.
https://community.jaspersoft.com/wiki/how-hide-table-row-based-conditional-expression 

Announcements


Top Tags