Print Page | Close Window

pass query to crystal

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=2425
Printed Date: 19 May 2024 at 9:10am


Topic: pass query to crystal
Posted By: amirsarb
Subject: pass query to crystal
Date Posted: 24 Feb 2008 at 1:33pm
 hi all
My application, written in VB.NET 2005 , uses reports designed in CR XI.
I need to pass query from my application to crystal report and generate report.
(in my program, user can select that which fields, need to report. so i need to pass my query and crystal report generate it dynamically)
 
thanks



Replies:
Posted By: hilfy
Date Posted: 26 Feb 2008 at 12:36pm
The property that you need to look for/set is CommandText.  This allows you to set the SQL query that the report runs.
 
I suggest setting up a report template that already has a "dummy" command in it.  You can then access that command by name to set the SQL rather than having to create a new one on the fly.
 
-Dell


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


Posted By: Neena
Date Posted: 28 Feb 2008 at 1:33am
Hi
  Is it possible to desing CR in VS.net 2005 at runtime. Then pls help me also. I'm too stuck with the designing at runtime.
 
Neena


Posted By: hilfy
Date Posted: 28 Feb 2008 at 5:57am
Yes, but it's not easy.  If you do a search here there are posts in the forums that explain how to do this.
 
-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