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!

What are my options?

Status
Not open for further replies.

jflo

Programmer
Mar 13, 2001
44
0
0
CA
CR 8.5
I've got a report that lists employee's name and the amount of minutes assigned in regular and overtime. Looks like this:

Div1
Empl1 0
Empl2 580
Empl3 518
Empl4 539
Empl5 0
...

Div2
Empl6 0
Empl7 580
Empl8 518
...

Div3
Empl9 580
Empl10 518
Empl11 539
Empl12 0
and so on...

the data is grouped by division.

What I need is: 1) to get rid of the zeros (suppress the entire line when time = 0) that work's fine with conditional formatting, 2) add a section at the end of the detail section with the time = 0 employees (that is where I'm having a hard time).

I've tried a sub report but I must be doing something wrong because it does not display in the viewer (I get the report but I can't access the page where the sub report should appear). I can't modify the source or the query because the report is called from a VB app with parameters and I don't have all the licenses for the plugins to compile the executable afterwards.

What are my options? How should I proceed? Where should I start?

The end result should be like:

Div1
Empl2 580
Empl3 518
Empl4 539
...

Div2
Empl7 580
Empl8 518
...

Div3
Empl9 580
Empl10 518
Empl11 539
and so on...

Not scheduled
Empl1 0
Empl5 0
Empl6 0
Empl12 0
and so on...

Thanks

jflo
 
That doesn't look like a section at the end of the detail, that looks like something you'd want in the report footer.

Good that you provided examples, text descriptions rarely convey requirements well.

I think that the simplest way to handle this is to eliminate the 0 rows in the main report (Report->Edit Selection Formula->Record:

{table.value} = 0

Now insert a subreport into the report footer and use the reverse in the record selection:

{table.value} <> 0

-k
 
Thanks for your reply.

I've tried just that but when I execute the report from the application, in the viewer I can't accessed the last page of the report. I get "5 of 5+ > |>" but can't get on the 6th page. If I get rid of the subreport, it works fine.
 
Subreports work fine for this, you're doing something that's confusing or delaying it.

Is the subreport an on demand subreport? If so, you'll have to wait for it to query and then display.

How many pages does it have withoyut the subreport, just 5?

Place the subreport into the MAIN report footer, and don't use a on demand subreport.

-k
 
To create the sub report, I've made a copy of the original and dropped everything but the two fields I needed. Saved it as the same name but with subrpt in front. When I add the subreport to the main report, I link it to some field (is there a particular field I should link it to or no link at all?). It's not an "on demand" report and it is in the "MAIN" (by the way, is the "Report Footer" the MAIN?) report footer.

Thanks

jflo
 
The subreport is still not displaying on the last page of the report. I get the same "5 of 5+ > |>" but can't get on the 6th page. The main report is called from VB with parameters, is that what's causing my problems with the subreport? Can I use variables to pass information along to the subreport?

Thanks
 
If you can't use subreports for this, you might try the following:
1. Create a formula to separate "0" records from others
i.e. formula name-> @zeroEmployee
contents -> iif(minutes<>0,"1. By Division","2. Not Scheduled")

2. Insert a group based on this formula (@zeroEmplyee). Make sure that it's the outmost group (i.e. Outside the Division group).

This assumes that the "Empl" records are the lowest level records in you queried data.

Tim
 
Thanks Tim,

Its been a month since the last post. I thought it was dead. I've change my approach and used formulas instead (as you suggest now). I ran into another issue with that approach where the reader installed with our application would not compute one of my formula. I ended up having to update the reader in order for it to work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top