Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Extracting Field Names Post Reply Post New Topic
Author Message
kurt
Newbie
Newbie


Joined: 08 Sep 2014
Online Status: Offline
Posts: 22
Quote kurt Replybullet Topic: Extracting Field Names
    Posted: 04 Jun 2015 at 6:54am
I have a report in CR 2011 and I want to use the actual field names (not the value) in the report.

I have messed around with formulas but am unable to actually put the name of the field on the report.

Any thoughts?

Thanks
Kurt
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 04 Jun 2015 at 7:03am
I have never seen it done.  Of course when you drop a field into the detail of the report.  A label is created with the field name.  You may be able to so something inside of a command.  But never had a reason to do so.
IP IP Logged
kurt
Newbie
Newbie


Joined: 08 Sep 2014
Online Status: Offline
Posts: 22
Quote kurt Replybullet Posted: 04 Jun 2015 at 7:20am
Thanks, I can think of some applications for this. Sort of word merge type stuff. Inserting the field name in a comment or something.

Maybe someone will come up with a solution.


Edited by kurt - 04 Jun 2015 at 7:20am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 04 Jun 2015 at 12:39pm
Word merge?!? Crystal Reports by-passes the Word merge process.  I have taken the text from Word documents, pasted it into a text box.  Added the fields the fields I needed.  Added any parameters and I was done.
IP IP Logged
kurt
Newbie
Newbie


Joined: 08 Sep 2014
Online Status: Offline
Posts: 22
Quote kurt Replybullet Posted: 05 Jun 2015 at 1:55am
I was referring to the way word merge works, not that I wanted to do word merge.

For example:

This document contains a summary of <fieldname> and <fieldname>. They are the primary....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Jun 2015 at 3:50am
I do not know of a way to do this but I also am not clear on the value added here of this "label insert" vs. just typing in the field name. Each report will have a different data structure and if it doesn't then hardcoding the text (typing the name in) works the same as the process you are requesting. Also, quite frequently data column headers are not what you want to display to the end user but rather a less technical or agency-centric vocabulary.
 
What are we missing? If we understood that perhaps a different solution would present itself...


Edited by DBlank - 05 Jun 2015 at 3:50am
IP IP Logged
kurt
Newbie
Newbie


Joined: 08 Sep 2014
Online Status: Offline
Posts: 22
Quote kurt Replybullet Posted: 05 Jun 2015 at 7:36am
Because at runtime, the field name may be different in our application. The data source is created using a SQL stored procedure which concatenates the table name and the field value.

The list of fields is dynamic and modifiable by the end user. So when the report runs is the only time I know what the field name is.

And at a technical level it is not a field name, but because the data source is created using a stored procedure, CR thinks it is a field.

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 05 Jun 2015 at 1:27pm
From what I recall Crystal does not do dynamic field naming.  I seem to remember a similar question some years ago.  I think building some sort of temp table that gets built at run time where the temp table field names are stable, you just have to plug in the values from your data source.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.