Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CrossTab Calculated Member - GridValueat 1

Status
Not open for further replies.

PhantomEric

Technical User
Jun 5, 2009
5
AU
Hi,

I want to add two columns in a calculated member.

The rows have two levels, then column by month.
0 = Master GL Account (i.e. 410000)
1 = GL Account name
(I.e. 410100-10-10-Domestoic Sales Revenue
410200-10-10-Overseas Sales Revenue
............-etc.)
My data comes from a stored procedure.
I want to SUM two or more, non-consecutive, selected rows (GL Account Name).
My problem is rather then find the grid value, of each row, using the full GL Account Name(see above "410100-10-10-Domestoic Sales Revenue") I want to find the row by the LEFT 6 characters (i.e. 410100 ONLY, it is unique) this is because the GL name changes depending of selection criteria.
I could use, but the first 6 character remain the same.
I could use:
GridValueAt (currentRowIndex-?,currentCloumnIndex,CurrentSummaryIndex)
where? = number of row too offset.
But, over time there will be GL Account Names added to the report and the report would fail when one new account was added.

Is there a way to write the GridValueAt using a statement that looks at only the LEFT 6 characters?

Any assistance would be greatly appreciated,


Eric


 
If the first 6 characters are unique, create a formula that returns them (use LEFT() function), do the CrossTab on that formula, but set the DisplayString to show the full name.

hth,
- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Ido,

Thanks I'm new to Crystal. If the 6 characters are the second level of the crosstab,in lieu of the full name, how do I use DisplayString to show the full name?

Eric
 
From online help:

Customizing row/column labels

By default, row and column labels are derived from the data on which you base your Cross-Tab. You can, however, customize row and column labels.
Right-click the row or column whose label you want to customize and choose Format Field from the shortcut menu.
The Format Editor appears.
On the Common tab, click the conditional formatting button adjacent to Display String.
In the Format Formula Editor, create formula text that describes the custom names you want to use as well as the conditions under which these names should be applied.
For more information about how to do this, see Working with conditional formatting.
Click Check to identify any errors in the formula.
Fix any syntax errors the Formula Checker identifies.
When the formula has the correct syntax, click Save and close on the Formula Workshop toolbar.
You return to the Format Editor dialog box.
Click OK to return to your Cross-Tab.
Your customized row and column names appear when the conditions you set are matched.

Cheers,
- Ido


view, email, export, burst, distribute, and schedule Crystal Reports.
 
Actually, in your case, there's no need for a formula. Keep the CrossTab as-is and just customize the Label using the technique above.

- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Ido,

Thanks,

I will have a good look tomorrow.

I did get the displayString to work but now I will need to condition the formula to exclude Calculated Members, that have specific Header Names.

Thanks again,

You have set me on the right track.

Kind Regards,

Eric
 
Ido,
I used the Display String but the displayed data was the same for all rows(first row data only). As the Database fields are not in the Crosstab. I don't know how to get a Display String that uses a formula or database field that comes from each row.

Can you point me in hte right direction.

Kind regards,

Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top