?
Solved

transfer data from subreport to mainreport

Posted on 2009-12-18
2
Medium Priority
?
284 Views
Last Modified: 2012-05-08
Hello,

i'm working with CR 8.5 and VB6.

I made up a Report with a subreport.
-----
In the subreport i built an variable like this:

WhilePrintingRecords;
shared stringvar strFirstValue := cstr({dao.startzeit});

The formula is placed in the header section(either group or page header)  to get the first dataset from the detail Section.
----

I transfer this variable to the main report like this:

WhilePrintingRecords;
shared stringvar strFirstvalue;
strfirstvalue;

----

Everything is working fine, when i put the formula in the footer sections of the main report.

Unfortunately i have to use this value in the page header section. There i get always an empty string.

How do i assign this variable to work in the Page header of the main report?


Thanks in advance






0
Comment
Question by:huey60
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 1500 total points
ID: 26080641
You cannot use the result of value from a subreport at an earlier point in the main report - the subreport must run first before any data from it can be used in the main report.

If you want a visible output from your subreport below the page header, then, in principle,  you need to create another version of your subreport that can be placed in the page header (and produce no visible output but set the shared variables as required) above the point you want to display the result.

However, without knowing more about the structure and main-subreport links I can't say for sure whether you can achieve that. And of course page headers only get created if there is something to put on the page.
0
 

Author Closing Comment

by:huey60
ID: 31667749
thanks, i thought so, but wasn't sure
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

831 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