[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] SQR process generating unwanted empty PDF file



Hi, I am relatively new with SQR's and have recently written one that
created an .XLS file.
 
I did find out how to do this from emails in the SQR UG archives.
 
The SQR we wrote used tab delimiters and defined the output file with
an .XLS extension.
 
1) To get the tab delimiter:
 
 encode '<9>' into $tab
 
(See #5 below for example of use in syntax)
 
2) To get the extension:
 
Let $cobra_report = $FILEPATH || '.XLS' 
 
($FILEPATH was the path and file name we wanted to route it to on our
file server.)
 
3) Define output file and open:
 
Open $cobra_report as 1 for-writing record=700:fixed status=#ostat  
 
then
 
4) To write the file from a variable that was built in the program:
 
write 1 from $cobra_rpt_hdr_line
 
 
5) Also, if you need to retain any leading zeroes, use the following
code around the data:
 
let $quote    = '="'   !This combination will retain leading zeroes
when the file is opened. 
 
 
When we used this in combination with tab delimiting.  When we
double-clicked on the output file, it automatically opened as Excel and
didn't need to go through the wizard to define delimiters or text fields
(to retain leading zeroes.)
 
Here is an example of how it is used to build the output file combined
with the tab delimiters:
($quotea is just a plain quote let $quotea   = '"')
 
 
let $cobra_rpt_ee_line = '="00"'  || $tab      || $quote   ||
                                $j_emplid  || $quotea || $tab
 
 
As you can see, the code around the 00's is hard-coded, but the code
around $J_emplid uses the variables that were assigned.
 
The code around $j_emplid would be interpreted as:
 
 <9> || =" || $J_emplid || "  || <9>   
 
 ... and so on.
 
 
I hope this helps.  The SQR UG website has helped me tremendously.
There may be a better way to do this, but this is working for us.
 
D.
 


>>> <Jones.Steven@ups-scs.com> 10/23/2007 11:51 AM >>>
How do you generate an xls file from sqr?  I know how to generate a
.csv, but not an .xls.
-Steve Jones 

-----Original Message-----
From: sqr-users-bounces+jones.steven=ups-scs.com@sqrug.org
[mailto:sqr-users-bounces+jones.steven=ups-scs.com@sqrug.org] On
Behalf Of Véronique Mermaz
Sent: Tuesday, October 23, 2007 2:11 AM
To: This list is for discussion about the SQR database reporting
languagefrom Hyperion Solutions.
Subject: RE: [sqr-users] SQR process generating unwanted empty PDF
file


Hi Franck and thanks for your input.
I'm creating an xls file open $Output_Filename_Full as 1 for-writing
record={#RecordLength}:fixed Then I'm initiating a string containing
tabulations as delimiter and I'm assigning data into it within a
begin-sql loop like this let $delimiter = chr(9)
Let $print_Text =          $Emplid                                     
          ||          $delimiter ||      $Name                          
          ||            $delimiter
and then I'm just writing my string with WRITE 1 FROM $print_Text
next-listingAnd I'm closing the file at the end Close 1 I am not using
-printer:pd Thanks, Veronique
> From: franck.masson2002@laposte.net> To: sqr-users@sqrug.org>
Subject: 
> Re:[sqr-users] SQR process generating unwanted empty PDF file> Date:

> Tue, 23 Oct 2007 10:44:40 +0200> > you should have the option 
> -printer:pd > 1) supress this option> 2) look to your sqr code and 
> locate any print statement> with the hypotheses that you generate the

> xls output with the write statement> > Franck,> > > > > > > Message
du 
> 23/10/07 10:42> > De : "Véronique Mermaz" > > A :
sqr-users@sqrug.org> 
> > Copie à : > > Objet : [sqr-users] SQR process generating unwanted 
> empty PDF file> >> > > > > > Hello, I'm running an SQR process which

> is supposed to generate an XLS file. It works fine but for an unknown

> reason an additional empty PDF file is created as well. > > It
happens 
> only when the excel file reaches a certain number of lines (more than

> 60 lines).> > Any parameter to increase to fix this issue?Any ideas 
> are welcome. > > ThanksBest regards, Veronique> > > > 
> _________________________________________________________________> >

> News, entertainment and everything you care about at Live.com. Get it

> now!> > http://www.live.com/getstarted.aspx> > > > 
> _______________________________________________> > sqr-users mailing

> list> > sqr-users@sqrug.org> > 
> http://www.sqrug.org/mailman/listinfo/sqr-users> > > > > > Créez
votre 
> adresse électronique prénom.nom@laposte.net> 1 Go d'espace de 
> stockage, anti-spam et anti-virus intégrés.> > 
> _______________________________________________> sqr-users mailing 
> list> sqr-users@sqrug.org> 
> http://www.sqrug.org/mailman/listinfo/sqr-users 
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users 



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org 
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users