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

Input data on report

Status
Not open for further replies.

kken

Programmer
Jun 5, 2001
51
CA
Hello all:
I have been asked to create a report which takes in some values on the report itself. I started with a text object which does allow the input of text. However, I can't seem to refere to the text object to retrieve the value to use in my report.
Any help with this problem would be much appriciated.


Thanks
Ken
 
I think that what you seek is a parameter field.

This allows you to prompt for input and display it, for instance a date range parameter would pop up a dialog box asking for 2 dates, and then you can use them in formulas:

minimum({?dateparm})
and
maximum({?dateparm})

or display them:

join({?dateparm}," - ")

The same holds true for other data types.

Use Insert->Field Object->Right Click Parameter Fields and select New.

Hope this helps, if not, you generally get better results by posting example data and expected output.

-k
 
It is close to a parameter field. What I need to accomplish is to allow the user to input values on the report. Then I need to use those values to calculate another part of the report.
I am not sure if it is possible to trigger an event or something to accomplish this.
Any more thoughts would be appriciated
 
It sounds like what Parameters are designed to do, why would you not use them?

You can use parameters in the report to calculate values, etc., for example you can reference them in a formula, as in:

{table.field} * {?MyParameter}

would multiply the field times whatever was entered.

The text descriptions help, but nothing beats an example of the data, what would be enetered by the user, and what you expect it to look like afterwards.

-k
 
The report must be displayed first showing the totals.
Then I need to let the user enter information such as hours, wages, consulting fees, etc. Then take that info and calculate with the existing totals.
 
That helps a bit more...

I think that you'll have to rerun the report to make this happen.

You can have an on demand subreport which doesn't run until clicked, but they will be prompted twice, once when the report is first run, and then again when they click the on demand subreport.

-k
 
So does that mean there is no way to actually have them enter the information on the report rather then being prompted?
 
Unless they are using the report designer, or you use some external program to control the functionality.

-k
 
yep...Crystal needs all the information before it generates the report.

SV's idea of using an on-demand subreport is an interesting one though. I wonder if the parameters there would have to be entered before the running of the report or if they would be necessary only if the subreport is asked for.

If they are only required if the subreport is run then you may have your solution....never tried that.

Jim Broadbent
 
Thanks for all the info guys I'll give that a try and let you know how it goes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top