Solved

Crystal Reports Formula in CrossTab Report

Posted on 2015-01-13
6
315 Views
Last Modified: 2015-01-14
I want to enter a formula in my report to rename a field but I'm not sure how I do this when this field is used in a Cross Tab.

mechtest2.rpt subreport is  showing running total fields of which on field is called Coating Type.  Because there's not enough space to display some of these names, I created a formula (CoatName) to rename them.    But I can't figure out where I would tell it to use @CoatName

Mechanical-Test---Main-Report.rptMechanical-Test---Main-Report.rpt
CoatName.png
0
Comment
Question by:ITworks
  • 3
  • 3
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40548289
Just use it in the cross tab in place of the field it is updating

mlmcc
0
 
LVL 4

Author Comment

by:ITworks
ID: 40548930
I think I explained it wrong.  This portion of the report is a running total field.

I have a formula called coating that is:

  global stringvar coating;
if {Command.Name} = "Coating Type" then coating:={Command.displayvalue} else ''

The running total field to summarize is @coating

Then I created a formula called CoatName that reads:

if{Command.Name} = "Hot Dip Galvanized per ASTM A153" then
"HDG A153"
else if{Command.Name} = "Mechanically Galvanized" then
"MechGalv"
else if{Command.Name} = "Hot Dip Galvanized" then
"HDG"
else if {Command.Name} = "Plain" then
"Plain"
else if {Command.Name} = "ISO 10684" then
"ISO 10684"

CoatName is used to shorten the names so that they will display in my report better.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40549149
Can you save the report with data or provide a screen shot so I can see the issue?

mlmcc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Author Comment

by:ITworks
ID: 40549271
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40549667
I think your CoatName formula should use Command.DisplayValue  not Command.Name for the test.

You could then change the coating formula to

global stringvar coating;
if {Command.Name} = "Coating Type" then coating:= {@CoatName} else ''

One other comment, since the variables aren't used in other formulas you could change the formulas so they don't use them

if {Command.Name} = "Coating Type" then  {@CoatName} else ''


mlmcc
0
 
LVL 4

Author Closing Comment

by:ITworks
ID: 40549684
Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question