Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR for .NET Report Viewer Margins

Status
Not open for further replies.

N11689

Programmer
Jan 29, 2002
113
US
I am using VB.NET (2005) as an interface between our software application and Crystal Reports to display the Crystal Reports we have developed (in Crystal XI Release 2).

I have created a .NET solution with a module and a form. All the coding is done in the module. I use Form1.ShowDialog() to bring up the CrystalReportViewer (which was added to the form).

The problem I am having is that I need to programmatically change some of the Report Viewer properties depending on how the report was created. As an example: Some of our reports have the Report Option, Create Group Tree, selected, others do not. Regardless of how this option is set in the original report, the Group Tree is showing in the report viewer. I only see how to set this property to True or False. How can I pass the report's property setting to the viewer?

Also, the report is not displaying properly. It's as though there are margins (top, bottom, left, right) in the viewer that are causing my report to 'reduce' in size and truncate some fields.

Any help would be appreciated. Thank you
 
ReportDocument is the base report object in .net I would start there is see if there is a flag which states if the report has a group tree or not.

if a property/function like this exists then use that to set the viewer's displayGroup proterty to true/false.

if this doesn't exist then you will need to store the metadata in an external location and query for this when the report is loaded. either a database or common xml file for the reports. this will require maintenance as the reports are added/removed/modified.

I don't have any insight as to margin issue.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top