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

Inserting subreports into a report

Status
Not open for further replies.
Feb 26, 2004
58
0
0
US
I have a report that already contains 5 subreports. I want to insert another subreport. When I inserted this report, nothing shows up on the report. If I take the last subreport out the report works fine. So I traced it back to using a report selection in that subreport of monthtodate. That is causing the error. If I use weektodate or yeartodate it works fine. Does anyone have any suggestions.

I don't know what to do short of writing a bunch of code to always take the current months records.

Any help would be greatly appreciated.

Thanks,
 
You're saying that the subreport 'kills' the main report? Or is it some formula field in the main report that does it? If so, please post the formula in question.

Also please give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
madawc,
I am running on 8.5. After testing and eliminating things I discovered that when I add this formulat to the subreport and then insert the subreport into my main report it wipes out the
results from the other 5 subreports and this one.


{Employee.AuthorizationDate} in MonthToDate


All six subreports are located in the Report Footer section of the main report.

Any thoughts would be appreciated.

Thanks,

 
You could make it
Code:
not isnull({Employee.AuthorizationDate})
and
{Employee.AuthorizationDate} in MonthToDate
Even
Code:
not isnull({Employee.AuthorizationDate})
and
Month({Employee.AuthorizationDate} in MOnth(currentdate)
I still can't see why it's spoiling the other subreports, though. Are they in the same section or do you have several report-footer sections?


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
All the subreports are in the same report Footer section.

The subreport that I thought was causing the problem had been created by copying another subreport. So I ended up recreating the subreport from scratch. Then it worked. Well as I continued to work on the Main program and the various subreports all of a sudden another subreport started doing it. It too was a subreport that had been copied. So then I played around with it. I am not sure exactly how I got it too work.

This is really bugging me because this will periodically happen to me. Is there anything with margins or if a subreport overlaps another one.

What I seemed to have done was to scrunch the subreport as small as I could get it. But again I am not sure if that was the culprit, because I had tried that solution with the first problematic subreport and that didn't work.

It is so frustrating when you really don't know what is causing something.

Any insight on this would help. This is a report that I do have to update and change periodically and I run into this problem each time I end up changing it.

Thanks in advance for any help you can give me.

Kathy
 
Are you using the same names for Shared Variables? I've never really tested this, but I think whatever you set in one would be pre-set in the next.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top