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

RE: [sqr-users] Report distribution to multiple users



 Here is code that should help.

!***********************************************************************
******
!Example with new-report
!  You must ensure that the file extension matches that which is
specified
!  on the Process Scheduler Request when using the new-report command
!
!   do Get_Sqr_Report_Path ($SQRpath)                        !
ksqrpath.sqc 
!   do Get_Format_Ext ($ReportID, $SQRExt)                  !
ksqrpath.sqc
!   let $ReportFile = $SQRpath || lower($ReportID) || lower($SQRExt)
!   new-report $ReportFile
!
!Example when creating an operating system file such as a .csv
!
!   do Get_Sqr_Report_Path ($SQRpath)                        !
ksqrpath.sqc 
!   let $ReportFile = $SQRpath || lower($ReportID) || .csv
!   
!***********************************************************************
******

!This guards against the SQC being #included twice...
#ifndef GET_SQR_REPORT_PATH
#define GET_SQR_REPORT_PATH

#ifdef NT
#define FILEDELIMITER '\'
#end-if
!
#ifdef UNIX
#define FILEDELIMITER '/'
#end-if

!***********************************************************************
! Name:    Get_Sqr_Report_Path
! Purpose: parses the directory path out of the $SQR-REPORT
!***********************************************************************
begin-procedure Get_Sqr_Report_Path (:$path)

  let #path_end_pos = length($_sqr-report)
  while (#path_end_pos>0) and (substr($_sqr-report, #path_end_pos, 1) <>
{FILEDELIMITER})
    subtract 1 from #path_end_pos
  end-while
  let $path = substr($_sqr-report,1 #path_end_pos)

end-procedure Get_Sqr_Report_Path




!***********************************************************************
! Name:    Get_Format_Ext
! Purpose: Retrieves the OUTPUTDESTTYPE from the Process Scheduler
!          and returns appropriate file extention.
!***********************************************************************
begin-procedure Get_Format_Ext ($prcsname, :$ext)
  move '.lis' to $ext ! default
begin-select
rtrim(outdestformat) &outdestformat
  evaluate &outdestformat
    when= '2' 
      move '.pdf' to $ext
      break
    when= '3' 
      move '.csv' to $ext
      break       
    when= '5' 
      move '.htm' to $ext
      break  
    when-other 
      move '.lis' to $ext
      break                    
  end-evaluate
from ps_prcsruncntldtl
where oprid   = $_prcs_oprid
  and runcntlid = $_prcs_run_cntl_id
  and prcstype like 'SQR%'
  and prcsname = upper($prcsname)
  
end-select
end-procedure Get_Format_Ext

#endif GET_SQR_REPORT_PATH




 Gina Bencke
 Work 216-573-1005 X6805 | Mobile 440-479-9961 | Fax 216-573-1070
 Home Office 440-519-0060  
 

-----Original Message-----
From: sqr-users-bounces+gbencke=kichler.com@sqrug.org
[mailto:sqr-users-bounces+gbencke=kichler.com@sqrug.org] On Behalf Of
Dennis Gingrich
Sent: Thursday, March 13, 2008 8:37 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Report distribution to multiple users

We currently print out monthly reports for our various locations and
manually split them out and send to the various locations. 

I would like to make this electronically so every time the sqr breaks by
location a pdf report will be uploaded to a users report manager so they
can either view the pdf or print it.

Is it possible to send reports to the report depository for multiple
users with every report being only for that managers location?

 

dennis.gingrich@vitas.com

 

_______________________________________________
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