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

parameter pass from report to query

Status
Not open for further replies.

Roncayenne

Programmer
Sep 15, 2003
43
US
I am running CR8.5 against Oracle d/b and am new to CR but trying very hard to learn. I am going against one table in the d/b. It contains budget info and there are a group of fields for each month in the record layout. There is also a year field in each record. I have a query setup via CR Designer to retrieve all of the records for all of the months when a year parameter is entered in the query. I setup a report going against the query. I made 2 parameters on the report, one for the year as in the query itself and one for the month. So when you run the report, you enter a year and a month. I want the query to grab all the recs for the year entered and then report on just the month entered. It is working except for one thing. The year parameter that is entered at report time is not begin passed to the query. So if I entered 2004 when I ran the query and month 04, it still have the year from the last time the query only was run and does not take the year that was entered into the report.
Don't mean to be long winded,but hope I explained what I am trying to do.

Thanks for any ideas, you might have..
Ron
 
Consider showing what you tried rather than trying to describe it with text.

A simple explanation will generally net the best results:

CR version
Database/connectivity used
Example Data
Expected output

So showing what's in the Report->Edit Selection Formula->Record and describing what the data types are in the database, and what is in the Database->Show SQL Query would probably have gotten the answer on the first guess.

So the record selection should have something like:

{table.year} = {?YearParm}
and
{table.month} = {?MonthParm}

If this fails, try posting technical information rather than text that attempts to describe technical information.

-k
 
I was working on a script to answer the previous post from synapsevampire when I noticed something you mentioned about the record selection. I had the month like you said but not the year. I looked at my parameters and noticed that I had 2 year parameters. I figured out that one of them was one I entered in the CR Report and the other was generated when I entered the parameter in CR Designer for the query. Thats when I found out that the parameter data is passed to the query, but the parameter itself is entered into the report from the query!

Took out the year parameter that I put inot the report and put the year in the record selection and the report works! Whatever year I enter and month, it produces on the report.

Thanks so much for the comeback and info. I have been fighting this for 3 days! And thanks for bearing with me!!

Ron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top