Print Page | Close Window

Adding Sections 2 & 3 in section 1

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21254
Printed Date: 02 May 2024 at 7:32pm


Topic: Adding Sections 2 & 3 in section 1
Posted By: mlddmc
Subject: Adding Sections 2 & 3 in section 1
Date Posted: 05 Jan 2015 at 9:02am
I have been working on one aspect for this report off & on for a month!

There are 4 sections in this report and it has to occur in the order it does as it is a statement of Assets and Liabilities with trust income and expenses.

I need to add section 2 total to section 3 total and need that amount to appear in section 2. I tried using a Global CurrencyVar but am having trouble with placing parameters on the Var to get it to equal only the section 3 value. (and then I will place a reference to it in either details or heading so I can reference it in section two formula. Can someone help me? I'm not sure this will work so if someone has a better idea PLEASE LET ME KNOW!!! Thanks!



Replies:
Posted By: DBlank
Date Posted: 05 Jan 2015 at 9:21am

shared variables and running totals canno tbe placed in a section above where all of the details that make up the total value- in essence you cannot reference something that does not exist before it exists. The variable might exist but the value you are setting the variable to does not.

You can reference a value gotten via a summary function (sum(field), average(field), etc.).
If your data is such as a field is identifying the type of value in one field and the amount in another you can create a formula to zero out the ones you don't want and sum it.
example: if table.type='Asset" then table.amount else 0
Sum this at your group level and it will only give you a sum of assets for group one. THis can be displayed anywhere in group one and the value will not change. It will only change in the next group.
Hopefully the logic of this gives you a possible solution.
 
The other option is to use sub reports and shared variables passing values back to the main report. This is less efficient.


Posted By: mlddmc
Date Posted: 05 Jan 2015 at 9:57am
That logic hadn't escaped me however I am looking for a kluge of some sort. I don't write what the report contains and regardless of the order am charged with coming up with a solution.

Oh well, I'll get back to it, thanks for your reply!!



Posted By: DBlank
Date Posted: 05 Jan 2015 at 10:01am
I thought I gave you two options to try but if neither of these work maybe if you explain why they do not another option may present itself.


Posted By: mlddmc
Date Posted: 07 Jan 2015 at 1:52am
I am working on the referenced option. As I split my day up between several items (I run the Data Warehouse Project as well as reporting etc.) It may take a bit.

Thanks for the options!



Print Page | Close Window