Solved

Repeating Values from shared Variable

Posted on 2014-09-26
1
170 Views
Last Modified: 2014-09-26
I have a subreport with the following formula in the GH... This subreport is placed in the GH1a of the Main Report


//@SharedSummary
WhilePrintingRecords;
Shared Numbervar SumValue:=Sum ({Command.ChequeValue}, {Command.ChequeDate}, "daily");
Shared DateTimeVar TranDate:={Command.ChequeDate};

This formula is placed in the GH1b of the Main Report .. The problem is that the values are repeating till the next non 0 value....I need this value to show as well

//@SharedSumValue
WhilePrintingRecords;
Shared Numbervar SumValue;
Shared DateTimeVar TranDate;
Global NumberVar SumVal_Summary;
SumVal_Summary:=SumVal_Summary+ If {ArInvoicePay.JournalDate} = TranDate then SumValue else 0;
SumValue;

This formula is placed at the Report Footer of the Main Report.. Which appears correct...

//@Display
WhilePrintingRecords;
Global NumberVar SumVal_Summary;
SumVal_Summary

The only problem is that the Value at the GH1b within the Main Report is repeating Values until the next non Zero appears, and then that value repeats...I only want the value in GH1b to show if the Dates match between the subreport and main report, I also need the @Display formula to show a summary of the values from the GH1b formula

Hopefully this makes sense
0
Comment
Question by:Mikeyman_01
[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
1 Comment
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40346255
I think I understand what you want.

Try this formula

//@SharedSumValue
 WhilePrintingRecords;
 Shared Numbervar SumValue;
 Shared DateTimeVar TranDate;
 Global NumberVar SumVal_Summary;
 If {ArInvoicePay.JournalDate} = TranDate then 
 (
 SumVal_Summary:=SumVal_Summary+ SumValue ;
 SumValue;
)

Open in new window


I that doesn't do what you want can you show in a picture what you want.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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