Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Use fields from subquery in formula for base Report

Posted on 2007-10-10
5
Medium Priority
?
397 Views
Last Modified: 2012-06-27
I have a subquery in Crystal and need to you some of the fields in a formula for the base report.  Is there a way to do that? I am using Version 9.
Thanks,
Syhctl
0
Comment
Question by:syhctl
  • 3
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 20051322
Only if you are returning the values as part of the report dataset.

If not then you could use a subreport and shared variables.

mlmcc
0
 

Author Comment

by:syhctl
ID: 20051692
Could you show me the syntax and steps for that:
ie my subreport field is  {Vchrs} I need that field to use in my main report to calculate a formula.ie {Vchrs}/{1stVchr}  the {1stVchr} field is in my main report.
0
 

Author Comment

by:syhctl
ID: 20051703
The values are being returned as part of the data set. I show each query and their corresponding data.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 20051795
Basic idea

In the main report add a formula to declare the shared variables.  I generally use the report header

Name - DeclVars
WhilePrintingRecords;
Shared NumberVar VchrsValue := 0;

In the subreport where you can set the value
Name - SetVchrs
WhilePrintingRecords;
Shared NumberVar VchrsValue;
VchrsValue := {Vchrs};

In the main report where you want to use it
Name - UseVchrs
WhilePrintingRecords;
Shared NumberVar VchrsValue;
VchrsValue / {1stVchr}

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 20051799
note where you use it in the main  report must be after the subreport.

mlmcc
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

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…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Screencast - Getting to Know the Pipeline
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…

577 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