• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Setting up group/header name based on page number

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
bkourouma
Asked:
bkourouma
  • 3
  • 3
  • 2
  • +1
1 Solution
 
ebolekCommented:
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
 
bdreed35Commented:
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
 
bkouroumaAuthor Commented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
bdreed35Commented:
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
 
mlmccCommented:
Are you grouping on @headerName instead of ProviderName

mlmcc
0
 
bkouroumaAuthor Commented:
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
 
mlmccCommented:
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
 
bdreed35Commented:
bkourouma:

Just for my own knowledge, was it the ampersand(&) that caused the problem?
0
 
mlmccCommented:
Glad I could help

mlmcc
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now