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!

Crystal Report Headers on Every Page

Status
Not open for further replies.

begley

Programmer
May 1, 2003
22
US
I would like to have the Title of the report print on every page. I have created a cross-tab report and the cross-tab is in the header section..

Thanks Amanda
 
Create another pageheader section.
Right click on the pageheader and select 'insert section below'.
You can then go into the section expert and hit the up or down arrow to move any highlighted sections where you want them.

_____________
rh title
_______________
pghdr1 title repeated
_______________
pghdr2
crosstab report
_______________
details
_______________
etc...


 
I am beginning to think there is something wrong with my installation of Crystal.
First of all (my fault) my crosstab is not in the pageheader, but in the report header. I tried to do what you said, but when I go to section expert, the arrows move my highlight up/down, not the highlighted line itself. Also in another report, I have created a formula for the address. My number field (in the formula)comes out on the report as 1,202 E Whatever St not 1202. If I put the number field on the report by itself it is fine.

Any further help? Thanks
 
the arrows move my highlight up/down -

This is a very confusing thing to do because the report is renaming the section as well as 'moving' it. Or something like that. Just highlight what you want to move and hit the arrow and ignore the view box, or you'll get confused.
I'm not saying your install is not flawed, but that screen is confusing.
Have you said 'ok' to this and looked at your report to see what the results are?

The number to string stuff is ALSO confusing at first. Basically, if you change a number to text, you are probably going to see commas and sometimes even .00 !
You're going to have to do some parsing of the totext(number) in order for it to look right before appending it to your address.
Something like:

replace(totext(number),",","")

Ok, that looks confusing.
The replace format is:
replace(inputstring,findstring,replacestring)
so
your inputstring is the totext(number)
your findstring is the comma, aka: ","
your replacestring is nothing, aka: ""

Good luck!
 
I have tried this formula
replace(totext({VW_PERSONNEL.ADDR_NUM}),",","");
{VW_PERSONNEL.ADDR_NUM} & " " + {VW_PERSONNEL.ADDR_STREET}

it is still returning 1,547.00.

Can you see what I am doing wrong?

Thanks Amanda
 
You have to either assign the output of the replace statment to a stringvar OR just use the output in the final formula, because you're not really changing what's in the {VW_PERSONNEL.ADDR_NUM} field.

So, use either:

replace(totext({VW_PERSONNEL.ADDR_NUM}),",","")+ " " + {VW_PERSONNEL.ADDR_STREET}

OR:
stringvar nicenumber:=replace(totext({VW_PERSONNEL.ADDR_NUM}),",","");

nicenumber+ " " + {VW_PERSONNEL.ADDR_STREET}

 
ps - you'll have to do a replace to get rid of the .00 too, I didn't include that in the above formula, obviously.
 
Thanks, that worked. Sorry you have to be so specific with me. That got rid of the , but I still have the .00 I tried putting in another replace with the .00, but I keep getting an error. This is what I have now.
stringvar goodNumber:= replace(totext({VW_PERSONNEL.ADDR_NUM}),",","");
(goodNumber) & " " + {VW_PERSONNEL.ADDR_STREET}
It returns 1202.00

Thank you Amanda
 
Believe me, I've had tons of very specific help on these forums so don't feel one bit bad!! Glad to help, if able.
Here's what you should be able to use:

replace(
replace(totext({VW_PERSONNEL.ADDR_NUM}),",","")
,".00","")

 
A simpler approach is to use the following formula:
------------------------------------
ToText({VW_PERSONNEL.ADDR_NUM},0,"")
------------------------------------

The 0 as the 2nd argument says 'no decimals'
The "" as the 3rd argument says 'no thousands separator'

Cheers,
- Ido




CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks to everyone, I tried all three and they all three worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top