Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting up group/header name based on page number

Posted on 2004-10-18
9
Medium Priority
?
228 Views
Last Modified: 2008-03-06
Hello,

I am trying to setup the title for the headers of my groups in a reports so that the On the first page I have "ABC Compay" and the second page of the group I have "ABC Compay continued..."

This is what I have:

if PageNumber = 1 then " " & "Provider: " &  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) else

" " & "Provider: " &  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) &  " continued..."


But it gives me an error: "A Summary Has Been Specified for a non-recurring field. Details: @headerName"

Please Help.

Thanks
0
Comment
Question by:bkourouma
[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
  • 2
  • +1
9 Comments
 
LVL 10

Expert Comment

by:ebolek
ID: 12338777
Do you have a group on the provider name. How many different providers are there in the report. Did you place that formula in the group header1?

try this
if OnFirstRecord = true then " " + "Provider: " +  ({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) else

" " + "Provider: " +  ({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) +  " continued..."
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12338800
What section are you trying to put the formula in?

Are you grouping by ProviderName?  If so, I suggest trying this:

Change your Group to Repeat Group Header on each page.
You can do this by right clicking the left margin where it says Group Header X (ProviderName) and choose Change Group.
Under Options, select the property "Repeat Group Header on each page".
Next, change your above formula to the following, and place it in the Group Header:

if inRepeatedGroupHeader then
    " " & "Provider: " &  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) &  " continued..."
else
    " " & "Provider: " &  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName})

0
 
LVL 1

Author Comment

by:bkourouma
ID: 12339598
Both of those solutions give me the same error message.

I have 3 groupings: first is providername, then isNew and then month.

I am trying to put the @HearName in the Group providername header so that I know which provider it is. But ib the subsequent pages I want the "..continued."

Thanks
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 28

Expert Comment

by:bdreed35
ID: 12339698
Are you getting the same error message that you were getting in your original formula?

If so, you must not have posted the whole formula.  The error that you got indicates that you are trying to perform a summary function at a grouping level, and you are trying to summarize using a different field.
For instance, if you were trying to sum an amount field for the Provider Name group, you would need to write it like this;

sum({rpt_RPN_ByProvider_ByMonth;1.Amount},{rpt_RPN_ByProvider_ByMonth;1.ProviderName})

That would be valid assuming that you have a grouping in your report on ProviderName.
If you didn't have a group on ProviderName, than the logic above would give you the error you are getting.

Can you post the whole formula?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12339941
Are you grouping on @headerName instead of ProviderName

mlmcc
0
 
LVL 1

Author Comment

by:bkourouma
ID: 12340023
Yes I get the same error message. And I am doing the grouping on the providername. I did in fact post everything in the formula editor.

If I leave the formula like this: "" " & "Provider: " &  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) " I have no problem. But as soon as I do an if statement, I get the same message,
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 12342368
I just tried one like your first one in CR7 and it works fine.

if PageNumber = 1 then
  " " + "Provider: " +  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName})
else
  " " + "Provider: " +  Trim({rpt_RPN_ByProvider_ByMonth;1.ProviderName}) +  " continued..."

I assume you have the formula split on lines like mine above.  I did get an error when I used & to concatenate.  You may need to change the & to +

mlmcc
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12374552
bkourouma:

Just for my own knowledge, was it the ampersand(&) that caused the problem?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12375979
Glad I could help

mlmcc
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
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…

705 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