cancel
Showing results for 
Search instead for 
Did you mean: 

How to get specific value from crosstab subreport to main report?

rodney_rivera22
Explorer
0 Kudos

Hello Community,

I'm trying to find a way to share a specific value from a crosstab subreport to my main report with no success.  Can someone give me some guide my to get this done?

Thanks

Rodney

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Rodney,

You'd use a formula in the 'Display String' property of the field you wish extract the value from.

If you could provide more details, I can think of a way to share the value to the Main Report.

-Abhilash

rodney_rivera22
Explorer
0 Kudos

First, thanks for quick replies...

I did get to share the value from the crosstab subreport to main, but something is moving the column "Sales Avg" from position when I run the report from SAP B1.

Here are some examples:

This is SAP Crystal Report 2013 (SP 5) preview.  The green rectangle is the crosstab subreport.  THIS IS HOW I WANT IT!!

But, when running the report within SAP B1 (9.1 PL11), this is what I get...

The "Sales Avg" moved from position and it seems that the shared value is always the last one from the column group within the CrossTab because it is getting the value from the last column always.

Hope this can give you the view you need to help me resolve this...

Other thing very important... the "Sales Avg" is a calculated member

Thanks,

Rodney

rodney_rivera22
Explorer
0 Kudos

Hello,

Any suggestions on this?

abhilash_kumar
Active Contributor
0 Kudos

If it works from the CR Designer and not within SAP B1, try posting the question here:

-Abhilash

rodney_rivera22
Explorer
0 Kudos

Hi Abhilash,

Ok.  But, do you know a way to share the value of that specific calculated member "Sales Avg" from the cross tab subreport to the main report from any insertion position?  Doesn't matter were the position is...

Thanks,

Rodney

abhilash_kumar
Active Contributor
0 Kudos

Hi Rodney,

Would you be able to share the .rpt file with saved data?

-Abhilash

rodney_rivera22
Explorer
0 Kudos

First, sorry for delay and appreciate your help on this...

Try to get the .rpt from this link:

https://argns-my.sharepoint.com/personal/rrivera_argentisconsulting_com/_layouts/15/guestaccess.aspx...

Thanks again,

Rodney

abhilash_kumar
Active Contributor
0 Kudos

Hi Rodney,

It asks me to log onto Office 365.

You may want to send it to my e-mail (the address is in my profile).

-Abhilash

rodney_rivera22
Explorer
0 Kudos

I just sent the .rpt by email...

Thanks,

Rodney

abhilash_kumar
Active Contributor
0 Kudos

OK. Modify the display string formula to:

If GridRowColumnValue("ACS_SalesPerMonth.MonthYear") = "amount" then

(

    Shared Numbervar amount := CurrentFieldValue;

);

ToText(CurrentFieldValue);

This will always bring back the value from the Calculated Member column irrespective of its position.

-Abhilash

rodney_rivera22
Explorer
0 Kudos

Hi Abhilash,

I did test your solution and it works GREATE!!

Thanks a lot, you're the best!!

Rodney

Answers (1)

Answers (1)

former_member198519
Active Contributor
0 Kudos

A Crosstab object needs database fields as Rows/Columns. Unfortunately, you can't use shared variables from Subreports in a Crosstab