Print Page | Close Window

Subreport and detail section

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=130
Printed Date: 29 Apr 2024 at 8:37am


Topic: Subreport and detail section
Posted By: techie3
Subject: Subreport and detail section
Date Posted: 17 Jan 2007 at 2:24pm
I have a subreport that requires subtotals for certain accounts (original amt + income - expense).  I have determined each accounts' subtotals through vb.net and now I want to print this in the details section.  Since this data doesn't reside in a container (ie. table).  I think I need to create a temporary table and link it to the subreport and just have the details print from this table which would be just 2 fields.
 
 
Does this sound right?



Replies:
Posted By: BrianBischof
Date Posted: 17 Jan 2007 at 3:06pm
If you are creating the data in VB.NET and then opening the report via code, it is easiest to use formulas. Just create two formulas in your report that return a dummy value. Put those on the report where they are supposed to be. Then when VB.NET creates the report object, override the formula values using the following line of code:

myReportDocument.DataDefinition.FormulaFields("xxx").Text="999"


This overrides the current formula value with the new one.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window