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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you make a report look like TVGuide? 1

Status
Not open for further replies.

digitaldallas

Programmer
Jun 6, 2005
31
US
I would like to know if CRXI can make the following data elements:

Time
Network
Program

look like the online TVGuide or a string pivot table? For example:

8:00 9:00 10:00
ABC Program1 Program2
CBS Program1 Program2
NBC Program1 Program2 Program3
 
Try inserting a crosstab in the report header or footer where you use network as the row field, time as the column field, and maximum of program as the summary field.

-LB
 
Thanks! Silly me, I just assumed you couldn't summarize on a string field. There is still an issue with data that goes beyond the break (hour).

In the example above, for ABC, Program2 extends from 9:00 thru 10:00. In the cross-tab, Program2 will show up twice, once for each hour. I've tried formatting the field to 'Suppress If Dupicated,' but that doesn't work. Ideally I would like the summary field to extend from column to column depending on the time (duration).

Thanks for your quick response lbass.
 
You can't really do that with a crosstab. It sounds like you might want a chart for this purpose--maybe a Gantt chart?

-LB
 
You could do this manually, group by the station, then base it on the start time, something like:

whileprintingrecords;
stringvar Out9:="";
if {table.starttime} = time(9,0,0) then
Out9:= {table.program}

whileprintingrecords;
stringvar Out10:="";
if {table.starttime} = time(10,0,0) then
Out10:= {table.program}

etc...

Since you need to only display when it changes, you need 24 formulas alongside each other in the group footer (or what ever time periods), then suppress the group header and the details section, the grouping resolves which station.

So it will remain blank until it changes in the database. Also make sure that you are sorted by the time.

So all times are read into the variables, and then at each station they are displayed.

Looks good in theory...

-k
 
Ooops, you'll need the formulas in the details section...

Then additional formulas in the group footer section for display.

The group footer formulas would be:

whileprintingrecords;
stringvar Out9

whileprintingrecords;
stringvar Out10

-k

 
Still not quite right...

Instead use:

Group header:

whileprintingrecords;
stringvar Out9:="";

Details:
whileprintingrecords;
stringvar Out9:="";
if {table.starttime} = time(9,0,0) then
Out9:= {table.program}

Group footer:
whileprintingrecords;
stringvar Out9

Quite a bit of effort, although you can leverage copy and paste.

-k
 
Awesome! Thanks synapsevampire.

Now if CR would give us an "x-2" adjustment for height & width like they do for x position, this report would be in the can.
 
You can size height and width manually, and as a cheat you can insert additional sections and make the sizes appropriate them based on the number of time periods, then conditionally suppress the other sections.

-k
 
Yea, that was what I was thinking, too. Unfortunately, with 10+ time periods (half hour), that 'trick' becomes unworkable.
 
Well your example showed only 3, 1 hour periods.

Perhaps if you stated the actual requirements we can work something out.

-k
 
You're right.

Data:
Time (6 hours at 0:15 increments)
Duration (0:15 to 3:00)
Network (all)
Program Name

Parms:
StartDate
StartTime

The layout is in the first post. The report will cover a six hour span with the user selecting when the span begins.

The trick I was thinking was to create several versions of a field object at different lengths and make it visible when the duration fits the field object length. That seems like a lot of work, but it or creating multiple sections may be the only choice I have.

Thanks for your help.
 
You can set up one and make the times variable as well.

So instead of hardcoding the times, use the startdate (which is a time as well) as the first variables starting point and increment the others on this parameter.

Seems simpler now that you've introduced the parameter into the equation.

-k
 
As you've noted, allowing for the time periods to be dynamic, based on the parms, shouldn't be difficult.

What is vexing me is dynamically changing the program (field object) length based on duration. My goal is to allow the text (program name) to span through the time period. I could turn 'Can Grow' on/off based on duration, but I don't think I can control how far it can grow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top