4

Crystal Reports - Calculated Member Drops from Rep...

 6 months ago
source link: https://community.sap.com/t5/technology-q-a/crystal-reports-calculated-member-drops-from-report/qaq-p/13617475
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Crystal Reports - Calculated Member Drops from Report

cwarner

Participant

4m ago

I have a calculated member with a code that calculates the total values of the previous 10 rows.  However, sometimes there are less than 10 rows, because there was no data at that time.  When this happens, the calculated member "drops" from the report.  How can I change my code to compensate for "null" or "missing" rows?

Thanks for your help!

Here is my current code for the Calculated Member:

if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -1, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -2, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -3, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -4, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -5, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -6, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -7, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -8, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -9, CurrentColumnIndex ,1 ) +
if GridLabelAt ("Scheduling_Locations.Description",CurrentRowIndex) startswith ["Total"] then GridValueAt (CurrentRowIndex -10, CurrentColumnIndex ,1 )


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK