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!

Subreports with parameters from main report. 1

Status
Not open for further replies.

Ruairi

Programmer
May 14, 2000
314
US
I have a report that prints voucher information from SQL tables. It uses several subreports for different pricing methods that require different information. All of the tables in the report and subreports have 4 fields in common; Voucher, ContractorType, ContractorName, BrandName.

The Grouping of the report is set up like this:

GroupFooter1: Voucher
GF2: ContractorType
GF3: contractorname
GF4f: Brandname - Ton pricing subreport
GF4e: Brandname - Species Ton pricing subreport
GF4d: Brandname - SpeciesSort pricing subreport
GF4c: Brandname - Species Grade pricing subreport
GF4b: BrandName - Length/Diameter pricing sub

Each of these subreports has parameters for the 4 common fields, a record selection formula, and a formula to hide them so that they are only shown when needed.

I am printing this report in a CR8.5 viewer from a VB app. For some reason, every time it displays it brings up the 'Enter Parameter Values' dialog box asking for one parameter, "Brandname(specton.rpt)". I can't figure out why this one parameter gets asked for every time, and not any of the others.

Here are the record selection formulas for each subreport:

Length/Diameter:
{lengdiam_txt.brandname} = {?Pm-loaddata_txt.brandname} And {lengdiam_txt.contractortyperec} = {?Pm-loaddata_txt.contractortyperec}
And {lengdiam_txt.voucher} = {?Pm-loaddata_txt.voucher} And {lengdiam_txt.contractorrec} = {?Pm-cntrctr_txt.contractorrec}

Species/Grade:
{specgrad_txt.contractortyperec} = {?Pm-loaddata_txt.contractortyperec} And {specgrad_txt.contractorrec} = {?Pm-cntrctr_txt.contractorrec}
And {specgrad_txt.brandname} = {?Pm-loaddata_txt.brandname} And {specgrad_txt.voucher} = {?Pm-loaddata_txt.voucher}

Species/Sort:
{specsort_txt.contractortyperec} = {?Pm-loaddata_txt.contractortyperec} And {specsort_txt.contractorrec} = {?Pm-cntrctr_txt.contractorrec}
And {specsort_txt.brandname} = {?Pm-loaddata_txt.brandname} And {specsort_txt.voucher} = {?Pm-loaddata_txt.voucher}

SpeciesTon: (This is the one that always asks for the param)

{specton_txt.contractortyperec} = {?Pm-loaddata_txt.contractortyperec} And {specton_txt.contractorrec} = {?Pm-cntrctr_txt.contractorrec}
And {specton_txt.voucher} = {?Pm-loaddata_txt.voucher} And {specton_txt.brandname} = {?Pm-loaddata_txt.brandname}

Ton:
{ton_txt.contractortyperec} = {?Pm-loaddata_txt.contractortyperec} And {ton_txt.contractorrec} = {?Pm-cntrctr_txt.contractorrec}
And {ton_txt.brandname} = {?Pm-loaddata_txt.brandname} And {ton_txt.voucher} = {?Pm-loaddata_txt.voucher}

Any Ideas?

If someone thinks they can help with this but would like to see the report, email me and i can send you a report with saved data (although i'm not sure if the problem would show up with saved data). Anyway TIA.


Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Are there suppose to be no parameters prompt when running from the VB application?

If so then this should work.

Report.EnableParameterPrompting = False

that is what we do.
 
Thanks scrabble, that worked. I'm still a little curious why that one gets asked for and not the other parameters, but it works and thats the important thing.

Thanks again Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top