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!

Subreport Caption Changes during Exporting

Status
Not open for further replies.

crcdata

Programmer
May 26, 2005
10
US
I am having problems with on demand subreport captions being exported incorrectly. The report works and looks great in crystal.

Here is the on demand caption formula
Dim Text as String
Text = CSTR(DistinctCount ({SKU}, {WHSE}),0,",") & chr(10) & chr(13)
Text = Text & CSTR(Sum ({Incomplete Unit}, {WHSE}),0,",")
Formula = Text[/color blue]

In crystal 10 skus and 50 units would look like this
10
50

In PDF or Excel it looks like this.
1050

It is almost like PDF or Excel is failing to create the new line. It does not matter which order 10 and 13 are in.

I have a series of these subreports setup in columns. As you go left to right the subreport captions will give the number of skus and units in various stages of being processed. This report works and looks great in crystal reports. People can click on the subreport to get the details for that particular process.

Something else I have noticed is crystal will wrap the name of the subreport around within the field space if I don't give the subreport an on demand caption. However if I export to PDF only part of the caption is visible on one line.
 
Why are you using both chr(10) and chr(13)? Try it with just chr(13).

If that does not help, try having the fields as separate text items, maybe in different sections. The problem may be that you are using control characters, which the printer recognises and acts on but pdf is failing to do. Though I have used chr(13) and it has never given trouble in pdf.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
That still didn't work. I tried it with just CHR(10) also.

This is only occuring in subreport captions. It does not have any problems with other formulas.
 
Thanks for your work around idea of using 2 text boxes in different sections. I would really like to know how to fix this issue though.

I was using CHR(10) and CHR(13) together because I figured that is how all new lines occur in text.
 
Does anyone know? I've never had this problem.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top