Does anyone have any insight on how to report values on a single line in Crystal Reports 10?
I have used subreports (linking at PID) in the past. This is pretty sweet if you want to just look at it in Crystal, but I always have trouble when exporting data to a spread sheet. The columns always get out of sync and headers never line up... this holds for export to tab separated text as well and exporting to cvs only pulls data from the main report, not the subs.
So, I was looking at some syntax for concatenating values to a single line, but that keeps leading me down a dead end. Any help I can muster from CHUG would be excellent.
here's some syntax I have been playing with...
whileprintingrecords;
stringvar bp := "";
if mid(totext({obshead.name}),1)="BP DIASTOLIC" then "BPdia" + bp else
if mid(totext({obshead.name}),1)="BP SYSTOLIC" then "BPsys" + bp;
but it's just a long winded version of what Crystal does without any added formulas
I just want my report to show BPsys value BPdia value on the same line and not loose any formatting when exporting.
Hope someone knows a little something about what I'm after! If there is a solution for exporting data using multiple subs in a detail line or if some syntax to put multiple values (from multiple obshead.names) in a single line...
Thanks so much -Rich
The trick to this is not concatenation, but the way your fields line up and any blank spaces between fields.
When exporting with subreports, make sure that they line up with the rest of your detail (or header/footer) lines; including making sure they are the same height.
Also, fields should be touching one another - or else extra blank columns.
When I design a report, I often must plan its output. To be pretty (and possibly pdf), then placement not important. Otherwise, make sure everything perfectly lines up. And beware of the summary totals etc that could be in header/footers. If they are wider than the detail, then extra Excel columns.
I'd be happy to talk more, if you wish.
~Joe G
That's sort of what I figured (I've heard it before), but I still have problems exporting.
Do you have a report example you can share?
Thank you for the advice!
-Rich