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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Run/Execute *.qml file through java code

DarshanT
1-Newbie

Run/Execute *.qml file through java code

Hi Expertes,


I would like to understand is it possible to execute/run the QML (Windchill report) through java code? I'm aware of importing/loading into windchill but i'm interested to execute the qml through java and get the response. I have tried exploring the report code but got no clue.


Thanks,


Manjunath Reddy

4 REPLIES 4

Hi Manjunath

please take a look at the webject

<ie:webject name="Generate-Report" type="OBJ">



The Generate-Report webject executes a Windchill Report Template and returns

the results as an Info*Engine group. WCAdapterGuide details out the syntax
of the webject.



HTH



Thank you and have a great time.

Best Regards

Swamy Senthil

Principal Solutions Architect, Swasen Inc

swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);






jessh
5-Regular Member
(To:DarshanT)

There are supported Java APIs for this purpose as well.

See wt.query.template.ReportTemplateHelper, for instance.

--
Jess Holle

Hi All,


Thank you for all your suggestion and ReportTemplateHelper.convertToReader did the trick.



Thanks,


Manjunath Reddy

tschwei
4-Participant
(To:DarshanT)

Hi Manjunath and others.

I'm also struggling with running a saved report template via java code.  Manjunath, how did you use convertToReader()?

ReportTemplateHelper class has limited Javadoc, and I don't see ANY Javadoc for ReportTemplateHelper.convertToReader()?

By guessing on the input hashmap and other parameters, I have been able to get a report to run using ReportTemplateHelper.generateTableModel(), but I can't figure out how to export it as a CSV file.

Is there any sample code that runs a report using ReportTemplateHelper and saves the results to a file?

 

Thanks,

Tim

Top Tags