Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: mulit records showing not sure why Post Reply Post New Topic
Author Message
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Topic: mulit records showing not sure why
     Posted: 07 May 2013 at 9:09am
here is my set up

GH
shared stringvar field;

details(suppressed)
shared stringvar field := "";

field := field & {field} & ",";

GF
shared stringvar field;

field

i have this layout for multiple variables to show all on one line in my footer which works but it's giving me multiple records in the line.

i.e.
output looks like this

name, name, name, name, salary, salary, salary, type, type, type, so on and so on for every record.

i made sure that my table linking is all correct and i'm just not sure what could be causing this issue.

any help would be awesome!

thank you!

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 May 2013 at 12:03pm
it will insert the result from every record. You can add a conditional clause to avoid it
 
shared stringvar field := "";

field := field & (if instr(field,{field})>0 then "" else {field} &",");
 
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 08 May 2013 at 1:32am
DBlank, you sir are the man. thank you!
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 08 May 2013 at 5:25am
DBlank, any idea why when i view the report inside of crystal it looks amazing but when i export to csv it's all out of whack and crazy?

WhilePrintingRecords;

Shared StringVar OutputFile;
Shared StringVar Salary;
Shared StringVar EEName;
Shared StringVar EEType;
Shared StringVar Degree;
Shared StringVar AIMS;
Shared StringVar FTPT;
Shared StringVar NAIS;
Shared StringVar RPCS;
Shared StringVar sStep;
Shared StringVar Teach;


StringVar sOutput := "";

sOutput :=

EEName + Salary + EEType + Degree + AIMS + FTPT + NAIS + RPCS + sStep + Teach;

// Carriage Return / Line Feed
sOutput:= sOutput & Chr(13) & Chr(10);

// Write line to file
mioMPAYIOAppendToFile (OutputFile, sOutput);

sOutput;

here's what i'm using for the crystal io functions.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 May 2013 at 5:55am

I rarely have to export so not too familiar with the nuances of it.

You may want to try a new post as others that frquent the forum do post on this topic.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum