Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Change Source of Field Post Reply Post New Topic
Author Message
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Topic: Change Source of Field
     Posted: 26 Feb 2014 at 5:34am
Hi,

I have reports that need a couple new fields added to them. The Datasource has been updated and displays the new fields in the Field Explorer. It's the same Datasource that was already in the report, just with a couple new fields.

The existing report fields have several formatting options and suppression code. Rather than recreate all that formatting and code for the new report fields, I would like to simply copy an existing report field, and then point it to the new Datasource field.

Here's a small example for clarification:

(previous)
FIELD EXPLORER:
- SP_Persons
     - FirstName
     - LastName

(new)
FIELD EXPLORER:
- SP_Persons
     - FirstName
     - LastName
     - MiddleName

On the report form, there are 2 fields. FirstName and LastName. I would like to make a copy of the FirstName field, and then point that copy to the MiddleName Datasource field. So the new MiddleName report field retains all the same formatting and code without having to manually drop in the new field from the Field Explorer, and then go change all the formatting and code by hand.

Thanks in advance!
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 26 Feb 2014 at 8:01am
you could try to change data source
database tab >>set data source location>> then just update
the old table with new table
IP IP Logged
PaulyWally
Newbie
Newbie


Joined: 16 Aug 2013
Location: United States
Online Status: Offline
Posts: 12
Quote PaulyWally Replybullet Posted: 26 Feb 2014 at 9:01am
Originally posted by kostya1122

you could try to change data source
database tab >>set data source location>> then just update
the old table with new table


I already did that. The datasources have been updated to bring in the new database fields. That doesn't save me from manually dropping the new database fields onto the report design, and then formatting each of the new fields exactly the same as every other field on the report.

I'm trying to save myself a lot of redundant work on the design of the report. For example, when I view the existing report, the 'FirstName' field might have the following formatting:

Times New Roman
12pt Font
Blue Font Color
Black borders
<suppression code>
etc...

'MiddleName' is a new database field. I don't want to drop it onto the report and set all that formatting and coding manually. I want to copy all that formatting to the new 'MiddleName' field.

My original question assumed there is a way to copy the 'FirstName' field, and just change which datasource field it points to. (maybe that's where the confusion happened)
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 26 Feb 2014 at 10:32am
not sure if this is possible maybe
in file>>options > fonts
you can set the default font for the report and in
fields tab set your <suppression code>

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Feb 2014 at 10:57am

consider also just using the Format Painter.

If your suppression code can use currentfieldvalue in the way it is written it can be more effective.
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