Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can size and pos of Database fields be determined by Parameter fields

Status
Not open for further replies.
Mar 10, 2003
25
GB
Hi there all

Re: The required report must create a 'time table' for an academic institution:

Let me try and explain. Time values will make up columns. Date variables will make up the rows. Database fields will populate the rows, but their size and position with reference to the 'time' columns must be determined by their 'time from' and 'time to' variables.

Ill try and explain with an example:

8:00 9:00 10:00 11:00 12:00 13:00
Mon [MBA ][SLA ][HIST ][GEN MAN ]
Tue [SLA ][MBA ][GEN MAN ][HIST]
Wed [HIST ][MBA ][GEN MAN ][SLA ]

So the size and the positions of the Database field objects must relate to their 'start time' and 'end time' with reference to the 'time column headings' that will stay unchanged.

I hope dearly thatsomeone out there can help, as it would be ideal to do this in Crystal.

Many thanks,
Etienne
 
You can create 3 detail sections to allow for each example shown above, then conditionally suppress the sections you don't wish to display. Reebo
Scotland (Going mad in the mist!)
 
You can do this with 4 formulas and some formatting. You'll need to use a monospace font type. You'll need to group on your day.

I used "sched.class" to represent the [HIST] etc. above

Formula one formats the data to span your time columns. If you want the columns to be wider change the 10This formula goes in the details band:

{@to - from}
stringvar out;
numbervar spaces:=(({sched.to}-{sched.from})*24)*10 ;
out:="["+{sched.class}+replicatestring(" ",spaces-len({sched.class}))+"]"

You'll need three formulas to display the data.
This one goes in the group header.
{@sched init}
whileprintingrecords;
stringvar sched:=""

This one goes in the details band:
{@sched accum}
whileprintingrecords;
stringvar sched;
sched:=sched+{@to - from}

This one goes in the group footer:
{@sched display}
whileprintingrecords;
stringvar sched


Move the Group Name into the footer and suppress the group header and the details band.
It should look like this - (I eliminated the last "class" for display purposes):
Code:
            8:00     9:00      10:00   11:00     12:00    
Mon         [MBA            ][SLA            ][HIST      ]
Tue         [SLA            ][MBA            ][GEN MAN   ]
Wed         [HIST      ][MBA            ][GEN MAN        ]
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top