Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Reports Formula in CrossTab Report

Posted on 2015-01-13
6
Medium Priority
?
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 101

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 101

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 4

Author Comment

by:ITworks
ID: 40549271
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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