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

Subreport Question

Status
Not open for further replies.

Netpear

Technical User
Feb 18, 2008
10
US
I am currently using Crystal 10 to access data off a sql server.

The main report is a quaterly summary report based of HR staatistics and will need statistics from a Second report that has unrelated data.

This 2nd report is queried 40 different ways to get 40 different statistics off a single formula field in the report.

I know that I can take this second report and add it as a subreport to the main report and pull this single value into the main report. But right now, I think I need to run the second report 40 times, save it as 40 different reports and then add 40 subreports to the main report.

This seems ridiculus to me. I don't know how many subreports crystal can handle, but I can assume that the processing time for this report would take forever.

My question is there a way I can do this without doing it the way I described? Any suggestions would be appreciated.

Thank you
 
Where in the main report is the subreport placed? This can be a huge factor. Also, why not make the subreport your main report, and vice-versa?

Outside of this, we need to know more about the layout of the report to give a good answer.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
I think it would help if you described what each report does. Also, if the subreport has a parameter (for the 40 different queries), why not remove the parameter and instead group on the field that the parameter was used to query, and then potentially link the sub to the main report on that field, which they might have in common--because it sounds like there is some relationship between main and sub.

-LB
 


The subreport is a report that lists all positions in a hospital by department. The subreport has 2 fields available and authorized fte. These two are divided to get a percentage and that percentage is then pulled into the main report. There are 40 different queries that will give us a different figure and these 40 percentages need to placed in the report footer of the main report.

Right now the subreport has no parameters, it is a manual process. Right now the user manually writes 40 different queries based on the same report and takes percentage formula and places it in an excel sheet. I am trying to eliminate this process.

I hope this helps
 
We need to see the content of a couple of the queries.

It seems to me the subreport could be set up with a group on department, and then you could do the calculation in the group header or footer like this:

count({table.availableposition},{table.department}) % Count({table.authorizedFTE},{table.department})

...or something like this. But can't say for sure without seeing what the actual query is.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top