![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() 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 | |
![]() |
|
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. |
|
![]() |
|
![]() |
|
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 ![]() |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic SYNERGY
» SYNERGY/Change
»
regulary launch a xls report via script?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.