AlvarHanso
MIS
I am using Crystal Reports 5 to create a report on a SQL database. I have a subreport on a report that I want to return a spcific value for. For example the table looks like this:
guar_name guar_no
--------- ---------
Will Clark 1
Barry Bonds 2
Jose Uribe 3
The report is to display one guar_name on the subreport. In the situation in which the report will be run, the user will just print the report as usual if there is one guar_name that they can see in the user interface. But if there is more than one guar_name then the user will put a * in front of the name, and that is the name they want to print on the report. I.E. *Will Clark.
What I need the subreport to do is to grab the name of the person with the * in front of the name or else just pick the next on the list. If there is no * then just the name of the one guar_name will print. I have the formula field for the guar_name in the details section of the subreport and it currently will print all the names. The formula for guar_name is like this:
numbervar currlength := length(guar_name)
If Left(guar_name,1) := "*" then
guar_name[2 to currlength]
else
guar_name
The main problem is that the formula is evaluated on each record, and not a comparison to the other records. It just does this formula for each line. Is there a way to show the output based on a comparison to each record in guar_name?
Thanks a whole lot.
guar_name guar_no
--------- ---------
Will Clark 1
Barry Bonds 2
Jose Uribe 3
The report is to display one guar_name on the subreport. In the situation in which the report will be run, the user will just print the report as usual if there is one guar_name that they can see in the user interface. But if there is more than one guar_name then the user will put a * in front of the name, and that is the name they want to print on the report. I.E. *Will Clark.
What I need the subreport to do is to grab the name of the person with the * in front of the name or else just pick the next on the list. If there is no * then just the name of the one guar_name will print. I have the formula field for the guar_name in the details section of the subreport and it currently will print all the names. The formula for guar_name is like this:
numbervar currlength := length(guar_name)
If Left(guar_name,1) := "*" then
guar_name[2 to currlength]
else
guar_name
The main problem is that the formula is evaluated on each record, and not a comparison to the other records. It just does this formula for each line. Is there a way to show the output based on a comparison to each record in guar_name?
Thanks a whole lot.