Print Page | Close Window

Crystal Report display depends parameter

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17546
Printed Date: 03 May 2025 at 4:33pm


Topic: Crystal Report display depends parameter
Posted By: vmanis
Subject: Crystal Report display depends parameter
Date Posted: 11 Sep 2012 at 11:17pm
Hi,
   I have designed crystal report with visual studio 2005 XML driver connectivity. created report through XML file XSD schema. more than 5 XML file data im having.

i drag & drop the 5 XML file fields in Reports.

i want to display the report data depends parameter from outside report.

ie, if i need,third XML file data means send one parameter for displaying that particular XML data then it will show in viewer.

i confused with send parameter from outside.

how to get particular XML data in viewer.

Thanks in Advance.



Replies:
Posted By: zanyar-Jalal
Date Posted: 12 Sep 2012 at 9:59pm
As I understood you want to get your data from an XML file
if you want to do that you can see this video, I think it is helpful:

http://www.youtube.com/watch?v=dnomvMPCVRQ&feature=relmfu


Posted By: hilfy
Date Posted: 14 Sep 2012 at 9:48am
So, if I understand you correctly, although your report connects to 5 different XML files, you only want to show the data from one of them based on a parameter.  Is that correct?
 
Assuming that all five tables have the same number of fields, you would create a formula for each field you want to display and another one for each group you need on the report.  The formulas would be in this type of format:
 
Switch (
{?MyParam} = "1", {Table1.Field1},
{?MyParam} = "2", {Table2.Field1},
{?MyParam} = "3", {Table3.Field1},
{?MyParam} = "4", {Table4.Field1},
{?MyParam} = "5", {Table5.Field1},
True, "Not Found")
 
Use these formulas on the report instead of the actual fields.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window