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

Re: [sqr-users] #Define variables





Hi Kevin, I have used multiple defines in a separate include specifying the 
most likely sizes of columns and reports (like the use of a report 
template).  I then use a maximum size 2 dimensional array in my main SQR and 
populate depending on the subset of data.  This works for character oriented 
data only but allows variable field size (read column) in the array.  The 
variable size is by using a print mask with defines on field size when 
printing.

John Willson



Kevin Laroche <bydesign@magma.ca> said:

> Hi all
> I am trying to write dynamic reports that resize columns based on the 
#Define no_columns
> variable.  I would like to add a feature so that if the user selects a 
particular
> subset of data the report automatically adds a column and resizes all the 
column widths.
> 
> I have been using 
> #define no_columns   8
> at the start of the report then I calculate  the size of the columns from 
there
> 
> My question is...
> 
> This works but the report has to input the number of columns
> and I prefer not to link the form and the report that closely
> !--start of program
> #Define no_columns   8
> BEGIN-PROGRAM
> input #no_columns 'number of columns'
> #Define no_columns #no_columns
> !{no_columns} is redefined here to whatever number I want
> 
> !--much more code
> END-PROGRAM
> 
> This doesnt work
> !--start of program
> #Define no_columns   8
> BEGIN-PROGRAM
> input $user 'Enter a user name'
> IF $user = 'XXXX'
>    let #no_columns = {no_columns} 
>    let #no_columns = #no_columns + 1
>    !{no_columns} is not redefined here -results are uncertain at best
>    #Define no_columns #no_columns
> END-IF
> 
> !--much more code
> END-PROGRAM
> 
> Any suggestions from the guru's ?
> 
> Thanks
> 
> Brio 6.1 on Windows 2000 with Oracle 8i
> 
> 
> Kevin LaRoche - Oracle Forms and Brio too
> Ottawa Ontario
> 
> 
> _______________________________________________
> 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