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

Can't find where a parameter is set up to select records or groups

Status
Not open for further replies.

kims212

Programmer
Dec 17, 2007
103
CA
Hi

crystal reports xi, windows 7

I have a report that does only one thing - call a subreport.

the subreport is also very simple; it has two fields in the detail section based on a cascading parameter which also works fine and this report is what I see when I run the host report - two fields in the detail section.

the problem is, that when I run the subreport by itself another parameter is requested but I can't figure out where it's used or what causes it to be there. It's not requested when I run the host report.

when I run the subreport, the cascading parameters work as they should and I know that they're requested because they're in the record select; but following the cascading parameter entry, this other parameter is requested but it's not in the record or group selection formulae and if I enter nothing it doesn't give me a message, it just goes on to the report which prints the two fields in the detail section.

I can't delete it because it says it's used in the report but I can't figure out where.

hoping you can help
thanks
 
When you link a sub report crystal creates a dummy Paramter to be used for record selection.

So when main report is run Crystal deals with populating Linking parameter. However, if you try to execute SR on its own you need to provide a value for the paramter.

If you look in select expert in SR you will see the paramter, usually {pm-paramter name}

You can also create an SR with its own Paramter, this can be linked to a Main report paramter too, so gain does not nede to be populed if main report executed.

Ian
 
Hi Ian

thanks so much.

ah yes, I do recall having to specify a linking parameter for a subreport now, but it's been a while so I'll have to figure that out again. when you said, "so gain does not nede to be populed", I don't understand what is meant by gain, was that a little typo? I make tons of those things; what was that supposed to be?

if I may, I will probably have some other questions while I try to get this working.

one thing that does have me puzzled, is that once I edit a report and close it or save it, the next time I try to open it, it tells me that, "the report could not be opened for writing. any changes must be saved to a new file." even if I close and reopen cr, the same error occurs; I can't reopen a file to make changes until I restart. is there some option I have to set to avoid that?

thanks
kim
 
For
so gain does not nede to be populed if main report executed.

Read

so again does not need to be populated if main report executed.

Less haste more speed

Linking paramters is done in linking screen, main parametr will be in main windowed, linked parameter can be found in the lower left drop down,

I have seen your "the report could not be opened for writing. any changes must be saved to a new file." with version CR8 when used with two screens, if you drag crystal onto second screen this happens. Was not away that it happens with later versions too.

If you are not using two screens then I am not sure why it would happen.

Ian
 
no, just one screen.

this never used to happen and I don't think anything has changed, but of course something must have.

thanks for the info re sr linking, I'll try to fix the st to do what I need it to do.

thx
kim
 
Are you working remotely, and connecting via internet. I have heard mention that if link drops momentarily you can get this error.

Ian
 
no, I'm working on my desktop connected to our in-house server.

kim
 
One approach to tracking down where the parameter is being used is to change the data type to something different such as date. If the report is expecting a different data type it will create an error and the report will stop, pointing you to its location.

The other approach is to export the report to "Report Definition" which creates a text file of all the report details. Open this file in a text editor (such as notepad) and do a search for the parameter name.

Cheers
Pete
 
thanks Pete

I'll try that; I'm hoping to be able to get back to the report tomorrow unless the gods intervene as they are wont to do.

kim
 
Change the type of the parameter and see where you get an error. It could be in a formula.
 
thanks Charliy

still hoping to get back to that report today if I can keep out of the line of fire of "the powers that be".

I'll report back.

kim
 
I usually change the formula to divide by 0, that way it errors out and should show you everywhere that it's being used.

-Dell

DecisionFirst Technologies - Six-time SAP BusinessObjects Solution Partner of the Year
 
thanks hilfy

I've tried that in other reports to find out what values are in certain fields for debugging, and it works well, but I don't see this one being used in a formula. as Ian W. said, it's subreport linking parameter and I'll have to preset it when I run the subreport independently.

thanks
kim
 
I think you should just save the subreport as a separate report if you want to run it independently.

-LB
 
thanks LB

the end result won't be simply a report that calls a subreport, I was just trying to reduce it to the simplest form to make it run and give me the parameter selections I want and once I have that working, I'll call the subreport from the actual main report.

what I'm trying to do, is:
[ol a]
[li]in the main report, present a list all alphabetic characters as the parameter from which to select the initial of the last name[/li]
[li]pass that character to the subreport[/li]
[li]the subreport then:
[ol i]
[li]retrieves a list of all of the contacts with the last name beginning with the character selected in the main report[/li]
[li]presents the list of the first three characters of the last name for the character selected[/li]
[li]presents all the contacts with the last name beginning with the first three characters selected[/li]
[li]passes back to the main report the name of the contact selected[/li]
[/ol]
[li]the main report is run for that contact[/li]
[/ol]

the purpose of this process is to print a transcript for the contact selected

originally in the man report, I was asking for the first initial of the last name, thinking that I could then list all of the first three characters of the last names, beginning with the initial selected, as the next parameter and then list the contacts as the next parameter, but it was missing some of the first three characters. I think it was because I was running out of room. so I tried to resolve it as I described above.

I just forgot that that was what I was doing and why there was a parameter for the first initial of the the last name. it's been a while since I started this report.

I know that you don't really like long-winded explanations, but I can't think what I could send to illustrate it unless I send the report, but you wouldn't have my data unless you wanted me to send along creates and updates for a small sampling. sorry.

thanks so much
kim
 
I remember this report from thread766-1659034. I don't see how you are using a value from a subreport to "select" something in the main report though. Did you try my final suggestion in that thread?

-LB
 
impressive memory.

what I thought I'd do, was to have first letter of the last name as a parameter in the main report which would then retrieve only those records with the last name beginning with that letter and then have the subreport, that gets the first letter of the last name, select only those contacts with ln beg w/the initial and then use the first three characters then the contact name for the next parameters.

I didn't think that I could do it in one report which is why I'm using a subreport; I was running the subreport independently only for testing the parameters and the resulting list.

thx
kim
 
But how are you then planning to use the results of the sub in the main report? You can't use shared variables for selection, and subs act like left joined tables and would not limit records in the main report that way either. All you could do is suppress irrelevant records, which isn't efficient.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top