Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: regulary launch a xls report via script?
Topic Summary:
Created On: 11-Feb-2004 11:16
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Raymond Zuniga, on Friday, March 11, 2005 4:56 PM

Answer:

I've not tried to install the CSAPI on another machine. I would assume you could just go to the directory and pull out the module and put it where your other perl lib exists.

found it under

<INSTALL HOME>\ChangeSynergy 4.3\cs_app\webapps\synergy\WEB-INF\bin\lib\ChangeSynergy

You would then have to make sure that the other version of perl finds the modules. You can do this by making sure your PERL5LIB variable is set accordingly.

For creating Excel spreadsheets, you can use the perl module Spreadsheet::WriteExcel . It's available at

http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.02/lib/Spreadsheet/WriteExcel.pm

I've used it to create spreadsheets directly from the perl scripts I have run on Change Synergy. But I have to use queryData and not ImmediateQueryHtml.

As for your password problem, there are a number of ways you could "hide" it. One system I've used in the past is to encrypt the password into a file and then decrypt that information when running a perl script. There are a number of perl modules you can use to do this. It depends how fancy or secure you want to get.

One simple solution:

file encrypt.pl takes a password string encrypts it and puts it in the file "ofile":

use Crypt::Simple;
open(OUT,">ofile");
my $plaintext="password";
my $ciphertext = encrypt($plaintext);
print OUT $ciphertext ;
close(OUT);

file decrypt.pl read ofile and reconstructs the "password" string:

use Crypt::Simple;
open(IN,"<ofile");
my @val=<IN>;
my $plaintext = decrypt(@val);
print "password is [$plaintext]";

The above two scripts use the following Perl modules:

Crypt::Blowfish
FreezeThaw
Crypt::Simple

All are available at http://search.cpan.org

If you find any more csapi examples, I'd like to see them as well.

Ray
 11-Feb-2004 11:16
User is offline View Users Profile Print this message


Luc Morchoisne

Posts: 2
Joined: 4-Nov-2003

Hello,

We are using the CM6.3/CS4.3 Synergy version with a UNIX server and some Xp client.
I 'm little bit new with CSapi. I have few questions

1)How can we use the perl CSapi installed on the Server from my Xp
client ( For security reason, All the CS user did not have access to the
cs_home/... directories located on ther server).
Is it possible to installed the perl CSappi on a local XP PC. If yes how.

2) About csapi->login function:
Apparently we must write our password in the parameter of the
function ( eve if we work on Unix). Do you know a solution to avoid the
diffusion of our password. Any solution is wellcome.

3)
I try to launch a report that is an xls format.
1) Is it possible via perl api script?
2) can i use the csapi->ImmediateQueryHtml for xls report
format despite is "*HTml" name.
3) If not, must i use the csapi->querydata first then write in
a xls file every element like you do in the exemple query/report and get
information from it?

4) Where can i found more examples about csapi usage.

Thanks.

Best regards.

Luc.
Report this to a Moderator Report this to a Moderator
 22-Jun-2004 15:43
User is offline View Users Profile Print this message


David Lynam

Posts: 25
Joined: 22-Jun-2004

Anybody got any thoughts on this?

We're planning on doing something similar to query every attribute and pull into an Excel spreadsheet - any info would be useful
Report this to a Moderator Report this to a Moderator
 2-Jul-2004 19:44
User is offline View Users Profile Print this message


Raymond Zuniga

Posts: 3
Joined: 1-Jul-2004

Answer Answer

I've not tried to install the CSAPI on another machine. I would assume you could just go to the directory and pull out the module and put it where your other perl lib exists.

found it under

<INSTALL HOME>\ChangeSynergy 4.3\cs_app\webapps\synergy\WEB-INF\bin\lib\ChangeSynergy

You would then have to make sure that the other version of perl finds the modules. You can do this by making sure your PERL5LIB variable is set accordingly.

For creating Excel spreadsheets, you can use the perl module Spreadsheet::WriteExcel . It's available at

http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel-2.02/lib/Spreadsheet/WriteExcel.pm

I've used it to create spreadsheets directly from the perl scripts I have run on Change Synergy. But I have to use queryData and not ImmediateQueryHtml.

As for your password problem, there are a number of ways you could "hide" it. One system I've used in the past is to encrypt the password into a file and then decrypt that information when running a perl script. There are a number of perl modules you can use to do this. It depends how fancy or secure you want to get.

One simple solution:

file encrypt.pl takes a password string encrypts it and puts it in the file "ofile":

use Crypt::Simple;
open(OUT,">ofile");
my $plaintext="password";
my $ciphertext = encrypt($plaintext);
print OUT $ciphertext ;
close(OUT);

file decrypt.pl read ofile and reconstructs the "password" string:

use Crypt::Simple;
open(IN,"<ofile");
my @val=<IN>;
my $plaintext = decrypt(@val);
print "password is [$plaintext]";

The above two scripts use the following Perl modules:

Crypt::Blowfish
FreezeThaw
Crypt::Simple

All are available at http://search.cpan.org

If you find any more csapi examples, I'd like to see them as well.

Ray
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.