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

report form using parameterized views printing excessive reports 1

Status
Not open for further replies.

ahaws

Programmer
Nov 28, 2001
355
US
Hi-
Very strange-
I have report form that uses 2 views for reference, with only one record in each view, and when I select to print the report, it wants to print about 300+ reports, when it should only be printing a 1 record report.

I have other reports that use the same views and they print only 1 record, so I am not sure as to why this report is printing 300+ records.

When I select the views and browse them before calling the report, it will print the 1 record. But if I take out the browse statement, it will print 300+ records.

Any suggestions as to why this is happening?
Thanks in advance-
Angie
 
From your description, I'm pretty certain that you have the wrong alias selected at the time to do your REPORT FORM.


-BP (Barbara Peisch)
 
The parameter value may be wrong, maybe you intended to look at primary key field and your parameter is look at wrong field.


Nick
 
Hi Barbara-
I am certain that I have the correct alias selected, but another strange thing was that I selected all that was on the report, created another report and pasted the text.
So far- it prints only one record.

Maybe something behind the other report was causing the mix up, but not sure.
As for now, I will just delete the other report, and use the one I just created.

Thanks for your help- If it occurs again I will revisit this forum and post it.

Thanks
Angie

 
It sounds like what is occuring is a Cartesian Join.

The 300+ records are the number of records in the 1st table. Rather than getting 1 record (current record) and multiple child records, you are getting one record and child records FOR EACH record in the parent. Therefore, if the parent has 300+ records, the results will have 300+ records.

You need to look at the join condition on the VIEW and make sure it is actually doing a one-to-many LEFT OUTER Join that is parameterized on the key value of the parent table.




Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top