Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Report output is numbers not text (string) Post Reply Post New Topic
Author Message
annlindgren
Newbie
Newbie


Joined: 04 Dec 2011
Location: United States
Online Status: Offline
Posts: 2
Quote annlindgren Replybullet Topic: Report output is numbers not text (string)
     Posted: 04 Dec 2011 at 2:13pm
Im using crystal repots XI to create a report that pulls data from LDRPS custom feild. 
The output data I receive in my report is numbers, when it should be text (string). Following the instrustions below, it still outputs numbers in the pickfrom table.
Can anyone help? What am i donig wroing??Cry

First thing is identify the field name that contains the Pick List value in

LDRPS.  In this example, I am going to use a custom Pick List field from the Asset Dictionary.

 

Figure 1

 

 

 

So checking the Screen Editor for Asset shows me that the field name (from the database) is U_PickListTest.

 

 

 

 

In the Asset database table, the value for the U_PickListTest will be stored as a number.  That number is referencing another table to display the proper value in LDRPS.  We need to do the same thing in Crystal to pull the appropriate value into the report.

 

I’m going to modify a copy of the Asset Details report to include the custom Pick List field.

 

Open the report you want to modify in Crystal and do a Set Datasource Location to make sure you are looking at your database.

 

Now you need to add the view to the report that will link the value from the U_PickListTest field in the database and give you the actual text value that is contained in the Pick List.  This view is called lv_PickFromList0.

 

Go to Database > Database Expert and expand your connection.

 

 

 

 

Here you will see a Views section.  Expand that to display the views and find lv_PickFromList0.

 

 

 

If you cannot see the lv_PickFromList0 view, see Appendix A.


Add the lv_PickFromList0 view to the report by highlighting and clicking the >  (or you can just double click lv_PickFromList0).  It will then be added to the list of Selected Tables on the right side.

 

 

 

 

If you are going to have multiple Pick List fields on the report, you will need to add this view more than once.  For instance, you have 3 Pick Lists on the Asset screen you want to display on the report, you will need to add the lv_PickFromList0 3 times.

 

It would be suggested to rename the view in the Selected Tables area so you know which one is which.  Right click on the lv_PickFromList0 and click Rename.  Here, I have renamed lv_PickFromList0 to PickListTest.

 

 

 

 

Now you need to set the link properly to be able to put the actual value on the report.

 

In the Asset table, find the field (U_PickListTest) that is storing the numeric value of the Pick List.

 

 

 


Place the lv_PickFromList0 (or renamed view) to the right of the table you are using.

 

 

 

 

Now drag the Pick List field on the left table (Asset.U_PickListTest) to the pkPickFromList field on the lv_PickFromList0 (or renamed) view on the right side.

 

 

 


In order for you to pull records correctly, you need to make this link a Left Outer Join.  If you do not do this, it will not display any records that do not have a value for the Pick List on the Asset screen.  Making it a Left Outer Join will insure that all Asset records appear whether they have a value in that Pick List or not.

 

Highlight the link between the two fields (as seen in screenshot above) and right click.

 

 

 

 

Select Link Options and make the link a Left Outer Join.

 

 

 

Click OK.
If the link is set correctly as a Left Outer, you will now see an arrow pointing to the pkPickFromList field on the lv_PickFromList0 (or renamed) view on the right side.

 

 

 

 

Click OK to leave the Database Expert screen.

 

To get the actual text value of the Pick List on the report, you need to add the Value field from the lv_PickFromList0 (or renamed) view from the Field Explorer onto the screen.

 

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Dec 2011 at 3:31am
don't have a clue about the system, but the last line of the instruction would seem to be the solution.  The number referenced seems to be the id of an item.  You would want to use the table that the value refers to, and display it on the report.
 
I know, not much help
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