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

Sporadic Sub-Report Bad Behaviour

Status
Not open for further replies.

DjangMan

Programmer
Jun 1, 2001
1,786
CA
My report pulls from two tables: Header and Detail.

In my report I have a sub-report. It is based on the same two tables: Header and Detail.

I am passing the three key fields from Header in the main report to the same three key fields in Header in the sub-report as parameters. Some other parameter values are being passed to the report but are not connected to the record selection within the sub-report.

Occasionally the sub-report pulls no records from the database. However, I can Preview the sub-report and manually enter the parameter values and see data. Just to make sure the right parameter values were being passed I put the parameters in the sub-report's report header. Suddenly the report starts to show data when seen from the main report.

CR 8.5 running in a Citrix session. Data source is ODBC going to a Pervasive 2000i SP4 database.

Any suggestions?
 
Try applying the service pack:


Post what's in the main and subreport record selection formulas.

It might also help to post what's in the Database->Show SQL Query from each.

Can you consistently repeat the failure? For instance if you then remove the parameter fields from the subreport report header, does it then stop executing correctly?

A dirty fix might be to insert a section below the report header, place the parameters, then right click that section and select Hide.

I'm inclined to think that it has to do with the record selection formulas being different, but...

There are a lot of possibilities here, the fact that you add the parameter values to the subreport Report Header obviously shouldn't make any difference, but Crystal does have some anomalies.

-k
 
Thanks SV,

I was about to say I have SP3 installed but that's on my development machine - not what the client has installed. I'll give that a try.

Django
 
Do you mean you are passing these values as links?

If the subreport never uses these values, it may fail to join to the 2nd table if no columns from that table are being used. By placing the columns on the report layout, you would be forcing the subreport to link to that table...

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks Ido,

The sub report uses about half of the links for record selection and half within formulas. The sub-report will be called many times. For example, the last report run ran the sub report around 40 times. Just once in the report it didn't run successfully - somewhere in the middle of the report.

It seems to run okay outside of the designer. If I find anything I'll pass it on.

Thanks for your responses.

Cheers,

Django
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top