[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Change heading inside a subreport when the subreport returns now rows.

Posted on 2011-02-14
2
Medium Priority
?
398 Views
Last Modified: 2012-05-11
Hi my background is as a developer in PeopleSoft apps. I am fairly new to Crystal reports (using version 9) since I would normally write an SQR. However, Crystal is a very capable tool andI have an opportunity to use it more - so I want to. So far though I am finding very limited online resource for syntax help etc (happy to receive site or book recommendations!).

Anyway, to my current problem. I have a subreport which uses a formula for a  heading . The formula is based on a simple count of rows - like this.

IF Count(queryname) > 0 Then
"heading text" + Clientnamefromquery
Else
"Alternative heading text"

When there are rows, the formula works. When there are no rows it seems Crystal doesn't even get to the formula, so is there a better way to display the "Alternative heading text"?

Thanks in advance!
0
Comment
Question by:simonpaul64
[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
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 34886629
Place each heading in its own textbox.
Use a conditional suppression formula to suppress each one ..

The conditional suppression formula for the 'There is data' heading would be..

IsNull({table.field})

where table.field is any data field that will be displayed if there is data to be printed.

For the 'No data' heading you use a conditonal suppression formula of
Not Isnull({table.field})

You can position one textbox on top of the other to get the heading in the same place each time.

The Conditional suppression formulas are entered in the X+2 button against the Suppress option in the Format Field dialog for each textbox. (and just to emphasise... these are 'when to suppress' formulas, not 'when to display')
0
 
LVL 5

Author Comment

by:simonpaul64
ID: 34886835
Yep - that's exactly what I wanted - and thanks for the emphasis on the suppression side - makes perfect sense.
0

Featured Post

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.

Question has a verified solution.

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

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…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

650 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