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!

Removing Old Parameters

Status
Not open for further replies.

DelSenato

Programmer
May 1, 2003
14
0
0
GB
I have a strange problem with an existing report which I have been modifying.

The report contained a parameter called {?Salesman}
I modified the report to use a new parameter called
{?Salesperson} as I wanted to use the 2 parameters for in-situ comparison. After satisfying myself that the new parameter (which was designed to use range rather than the old paramenter which used discrete values only) worked as expected I tried to remove the old parameter from the report.

I am unable to remove the old parameter despite the fact that I have removed all references to it in the report. The old parameter is stil showing with a green tick by its side indicating that it is stll being used. I have used the export function and exported the report definition to a .txt file and searched this for occurances of the old parameter. Again, no occurances are found.

Does anyone have any idea why this problem should be occuring. (I can, and have, renamed the parameter, hoping that this would throw up an error in a function or count but everything still works fine.)

Tearing my hair out here, any help would be greatly appreciated.

DelSenato
 
Try changing the datatype of the parameter--this should cause any formulas containing the parameter to pop up with errors.

-LB
 
I cant edit the datatype!. When I enter edit mode the datatype is greyed out.

Strange thing is that I cant change the name of the parameter if I right click it and select Edit yet I can if I doulble-click the parameter name in Filed Explorer.

I can confirm that it is not used in the following

As part of the select clause.
For field or section level suppression.
Passed to a subreport as a parameter.
Used in Running totals.
Used in Formulae.

I also tried going through every section in the Report Explorer and it doesn't show up there either.
 
I would check each section in format->section to see if the parameter is being used for other conditional purposes, e.g., conditional page breaks, etc., and also check other field conditions in format->field besides suppression, e.g, font, borders, etc. Since you say it is not being used in any formulas, I guess it cannot be used for sorting data, although report->sort tends to be a place where unwanted fields or formulas "hide." Also make sure it is not being used for a group select...

-LB
 
Could the parameter be coming from a stored procedure? That's the only time I've ever seen that you can't change the datatype for a parameter.

-dave
 
Export the report, and for the export format choose "report definition". This will create .txt file that will document your formulas. Then search the .txt file for the name of the parameter field.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
vidru (Dave), Stored proc it was, cheers mate. The problem I now have is that I have amended the SP to remove the parameter, the SP compiles successfully and I do a "verify database" in Crystal but the report throws an error stating "Failed to open a rowset" and then "Procedure or function has too many arguements specified".

Finally resolved the problem. The SP name which was being access was sp_rptNextWeeksActivities, the actual SP being accessed was sp_rpt_LastWeeksActivities. Not got a clue as to why that should be the case (the report may have been a copy of another report which was renamed)but it does explain why I was gettingt the "Procedure or function has too many arguements" error when I changed the SP.

Thanks to all who replied.

DelSenato
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top