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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports 10 for .NET - Cross tab question 1

Status
Not open for further replies.

krinpit

Programmer
Jul 9, 2003
10
0
0
IE
Hi,

I am trying to develop the report below (with any number of currencies). Is this possible in Crystal Reports? If I use a cross tab, the values in the left hand column appear as field values rather than field names, while the detail fields do not display these values.

* The column names are fields on the database
* The field values are fields on the database
* The Row names are based on field names on the database, but ideally they would be hard coded.

Please help!

Code:
                                      Currency A     	  Currency B          Currency C

BEGINNING ACCOUNT BALANCE                   0.00                0.02                0.02
BALANCE CHANGES FOR THE DAY                 0.00                0.00                0.00
CURNCY/SECURITY VALUE CHANGES               0.00                0.00                0.00

Thanks,
-John.
 
A name is ideally hardcoded? That goes against most design principles, and means that you'll duplicate the logic (and maintain) in numerous areas...

It seems that you understand the report correctly, providing you understand that a cross-tab is not a way to display all of the data in a table, it provides summary data at the column and row levels you specify for the aggregated column you specify.

A cross-tab is the only way to dynamically provide N number of columns. You could hard code a bunch of them and then conditionally suppress, but a cross-tab is easier, albeit less flexible.

Is something occurring that should not when you set this up?

Please state specifics rather than left hand column. Stating the values of the left hand column appear as values rather than names makes no sense, the left hand column has "BEGINNING ACCOUNT". How could that possibly be a value?

If you have a column which is a numeric that you want to use as a string type, create a formula for the numeric such as:

totext({table.value},0,"")

And use the formula.

-k
 
You should be able to place {table.currency} as the column field. It looks like the row labels are actually descriptions of the summary fields, and that you don't really have a row field. If you are able to insert the summaries, for each of these (it might depend on whether these are actual fields or formulas, and whether the formulas are available for a crosstab summary), you would leave the row field blank. The crosstab would display "Total" in the left hand column. You can right click on this->edit text object and add your labels with a return at the end of each one.

If you are also having trouble with inserting the summary fields, please share the formula(s) you are trying to insert as the summary field.

-LB
 
To resolve the problem above.

Set 'Currency' as a column
Do not enter anything for rows
For the summary field, enter in each field that you want depicted and seeing as you should only be expecting one of each, it doesn't matter which mathematical function you use for it (eg: sum(), max() etc)

Now, in the left hand column, you may enter a text object, each line representing its respective field

-John.
 
Just a comment. It would matter what summary you used if there were more than one result contributing to the summary, and this would probably depend upon where you place the crosstab in the report and the limitations placed on the data by your record selection formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top