Solved

Crystal Reports Formula in CrossTab Report

Posted on 2015-01-13
6
319 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

724 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