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

parameter question

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
I have a report using Crystal 8.5 instead of writing a second report exactly like the first except for adding a parameter, can you write the parameter then have it suppressed for one report then using the calling VB app unsuppress it and use it for another version of the same report ? Or can you add a parameter dynamicly when it is called ? I hope this makes sense to someone :):)
 
you could use one parameter to do all of that.

for example:

a parameter can limit or allow all records to be selected in the Record select formula

If you want information displayed when the parameter is a certain value and not otherwise....create a subsection or extra fields and control its display through a conditional suppress formula

Describe what you want to do and we can guide you Jim Broadbent
 
The first report and the second would contain the exact same fields. The first report shows all records that have not been invoiced. The second needs to be done by a persons name listing only his/her not been invoiced records so it can be printed and sent to that person. I have a VB form before the report that has the results in a DataGrid and a combobox that the user selects the name he wants the report generated on. I don't want it to produce a report with that is only grouped by a persons name. I need each to be generated as a seperate one based on the name the user selects in the VB form. That is why I wanted a parameter so I could feed the info to the report but if I do it that way then how can I generate a report that lists ALL also ? I have the first report completed and its fine for reporting all uninvoiced records. I just didn't want to have 2 seperate reports (trying to save application size)to produce these reports since they are identical except for the parameter. Hope this makes more sense. Thanks for your help.
 
the first report is all records that are NOT invoiced?
the second report is all records that ARE invoiced but by person?

Have I got that correct?

there is more to the report than simply the grouping here.

You require 2 parameters

1. to report invoiced or non invoiced records
2. to report all records or just those of one individual

{?Invoiced}
Type : String
Description: Enter "Y" for invoiced records or "N" for non-invoiced records.
Default: <here you would put &quot;Y&quot; or &quot;N&quot; whichever is most common>


for Person...you can have a drop down list to select the person's name or ALL for all people but grouped by their name
{?Person}
Type: String
Description: Select the person's name or &quot;ALL for all people.
Default: ALL

now the major different in the report is in the {?Invoiced}

For non-invoiced records You want to see all of them...however using these 2 parameters you could narrow it down to one person if you want.

In the record Selection formula you would add something like the following

(if {?Invoiced} = &quot;Y&quot; then
{Table.InvoiceFlag} = &quot;invoiced&quot;
else
{Table.InvoiceFlag} = &quot; not invoiced&quot;) and
(if {?Person} = &quot;ALL&quot; then
true
else
(Table.person} = {?Person});


you can create a formula where you can have a person group when you want invoiced records and no group when dealing with uninvoiced records

@groupingPerson

if {?Invoiced} = &quot;N&quot; then
&quot;NO GROUPING&quot;
else
{Table.person} ;

then use the conditional suppress to suppress the group header and footer

if {?Invoiced} = &quot;N&quot; then
true
else
false;

I know this isn't exactly what you want but you can see some of the choices that you have...Good Luck
Jim Broadbent
 
Thanks for your response Ngolem.

The reports are both based on the same critera. Not invoiced. The only difference is a report listing all and a report listed by each name (individual report not grouped by name)
 
Based on the last post, you will need only one parameter that would prompt &quot;Enter a name or &quot;ALL&quot; for all names&quot;.

Then in your record selection formula, add a line of code:

If {?Parameter}=&quot;ALL&quot; then true else {Namefield}={?Parameter}

Let me know if you have any quiestions.
Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Thanks I will give it a try and let you know.

Thanks again for the help
 
yes...dgillz is correct...the only tricky bit is if you are after &quot;ALL&quot; then do you wish to see the names...and if not do you want the records sorted as if there were no names involved...

if you don't want a person's name revealed when &quot;ALL&quot; is selected and then also have the records sorted by another criteria...then modify the grouping formual as follows:

@groupingPerson

if {?Person} = &quot;ALL&quot; then
&quot;NO GROUPING&quot;
else
{Table.person} ;

then use the conditional suppress to suppress the group header and footer

if {?Person} = &quot;ALL&quot; then
true
else
false;

Jim Broadbent
 
Thanks for all the help. It really means alot to me. Will be setting this up this morning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top