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

RE: [sqr-users] Calling multiple files & creating single output file



Quite right, you can't include the whole sqr, because you can't have more than 
one begin-program, end-program section.

You could do something with compiler directives like:
#define included included
#include sqr1.sqr  !contains all the procedures for sqr1
#include sqr2.sqr  !contains all the procedures for sqr2

Begin-program

Do sqr1-main
Do sqr2-main

End-program

The individual sqr's would look something like this:

#ifndef included   ! The begin program only gets called if the {included} 
variable has been defined by the calling sqr
                   ! If it is called standalone, the {included} variable will 
not be defined, 
                   ! so the begin-program section is needed.
Begin-program
Do sqr1-main
End-program
#end-if

Begin-procedure sqr1-main
Do etc-etc
End-procedure


Of course you would need to be careful that all your procedure names were 
unique, e.g. you could prefix all the procs with the
program name.

Steve.


-----Original Message-----
From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf 
Of Kim Meyrowitz
Sent: Tuesday, 18 April 2006 11:03 PM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] Calling multiple files & creating single output file

Can you #include an .sqr file into another .sqr file?  If so, how do you then 
call the "main" procedure to get it to run?

Unfortunately, I needed to called sqr file to be both run from my calling 
report and be standalone as well - which is why I went the
"Call System Using" option. But if I could somehow include it, that would be 
great!


>From: "Steve Cavill" <steve.cavill@infoclarity.com.au>
>Reply-To: "This list is for discussion about the SQR database 
>reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
>To: "'This list is for discussion about the SQR database 
>reportinglanguagefrom Hyperion Solutions.'" <sqr-users@sqrug.org>
>Subject: RE: [sqr-users] Calling multiple files & creating single 
>output file
>Date: Tue, 18 Apr 2006 20:38:55 +1000
>
>Could you #include the files instead - making it one sqr run?
>Steve
>
>-----Original Message-----
>From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
>[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On 
>Behalf Of Kim Meyrowitz
>Sent: Tuesday, 18 April 2006 12:09 AM
>To: sqr-users@sqrug.org
>Subject: [sqr-users] Calling multiple files & creating single output 
>file
>
>Scenario -
>
> >From one SQR file, I need to call other SQR files - I have done 
> >successfully
>using the "Call System Using".  This will create an individual pdf file 
>everytime.
>
>Is there some way to combine all these pdf files into one file?  This 
>would be better for our client instead of going into each indivdual pdf 
>file.
>
>Thanks!
>
>
>
>_______________________________________________
>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



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