Print Page | Close Window

Call Crystal SQL Command

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21886
Printed Date: 24 Apr 2024 at 2:25pm


Topic: Call Crystal SQL Command
Posted By: jsmarlow7102
Subject: Call Crystal SQL Command
Date Posted: 17 Feb 2016 at 6:46am
Hello All:
    I have a need to call a complex T-SQL script that live as a command in my .rpt file.   This command I need for it to be accessed by a formula field that I will create.   Then too, this formula field needs to pass a parameter (from an existing SQL table that is already in the report) to the command so it picks up the correct record.

Is this possible in Crystal?   If so, how do I pass the parameter to the command?    Thanks all.



Replies:
Posted By: hilfy
Date Posted: 10 May 2016 at 11:55am
The command will run before the formula is processed, so there's no way to do this unless you can put the command in a subreport and pass the parameter from the main report to the subreport.

For information about the right way to use Commands, see my blog post here: http://scn.sap.com/community/crystal-reports/blog/2015/04/01/best-practices-when-using-commands-with-crystal-reports - http://scn.sap.com/community/crystal-reports/blog/2015/04/01/best-practices-when-using-commands-with-crystal-reports

-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