Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Pass the value in Formula Field to subreport! Post Reply Post New Topic
Author Message
avt2011
Newbie
Newbie


Joined: 09 Mar 2011
Location: United States
Online Status: Offline
Posts: 2
Quote avt2011 Replybullet Topic: Pass the value in Formula Field to subreport!
    Posted: 19 Mar 2011 at 7:38am
Hello all,

I got an issues when pass value of Formula Field from main report to subreport Parameter Field in Crystal Report. Here are the steps that I did as following:
1. In main report, I created a TOTAL_AMOUNT Formula Field. I can see that value of TOTAL_AMOUNT when drag and drop it on main report. There are some other column field in main report.
2. I created a subreport in the GroupFooterSection of main report (not in the section details). In this subreport, I used the store procedure as a Crystal Report datasource. Therefore, Crystal Report to ask for enter parameter value and and just set NULL and ignore them at this step. Next I went to subreport and right click on it that will pop up the panel window and choose the option Change Subreports Links ..then opened Subreport Links to allow us setting the Available Fields to link the fields to subreport parameter. I linked three database fields from main reports to subreport parameter, and one dynamic formula field from main report to subreport parameter.
3. when I ran the application, the report showed the results of database field but not the result that associated to Formula Field

I found the interested thing if I click on the subreports area, it will popup another tabpage to show the result of missing TOTAL_AMOUNT field. I really got stuck in this issue. Any option to set between main report and subreport in order to asynchonize for displaying the results ???

Any helps or codes to solve this issues, I really appreciate it. Thanks in advance.

Edited by avt2011 - 19 Mar 2011 at 9:19am
AVT
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Mar 2011 at 3:22am
set your formula to a shared variable and then have the subreport access it and use that value (in the subreport) to drive the stored proc.
 
Not sure if it will work, as I don't call stored procs from my reports anymore, but it is worth a try.
IP IP Logged
avt2011
Newbie
Newbie


Joined: 09 Mar 2011
Location: United States
Online Status: Offline
Posts: 2
Quote avt2011 Replybullet Posted: 23 Mar 2011 at 4:18pm
Hello,

I found the solution why it did not display the TOTAL_AMOUNT on subreport because the size was too small when created the sub-report. I increased the size and the amount showed up the missing result. Thank anyways.
AVT
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.