cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports with statements

Former Member
0 Kudos
58

hi,

Could I execute a insert statements inside a formula field or other field on crystal report.

I wanna execute a statement like "insert into sales values (1,'Test")" every time that the detail group of report were executed.

It's possible?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

This is not possible. But there may be some work-around that the report design support may be able to offer.

Moving query to Crystal Reports Design forum.

Ludek

Former Member
0 Kudos

If you base your report on an SQL Command, you can do Inserts in that. An SQL Command is basically a Stored Procedure; you can do anything in a Command that you can do in an SP...

HTH,

Carl

Former Member
0 Kudos

Hi Carl,

How I can execute a Stored Procedure inside the crystal reports.

To my application anyway is helpfull, can be executing a SP or executing a statment inside crystal report or if I can build a variable inside the report and give it back to the application and from the application I can execute the statment.

Former Member
0 Kudos

In the database expert, under each connection there is an Add Command option, which will bring up a text editor where you can key in the SQL needed. It has to return the data back to the report, though. It's executed to retrieve data from the database, but can contain insert or other SQL command that do things other than a SELECT...

HTH,

Carl

Former Member
0 Kudos

It isn't solved my problem, I need to that this statement be executed every time that a detail group is printed, I work with the datatable from C# like a datasource of the report so for each row in this datatable the report pass through the detail group and in this time I need to execute the statment.

Former Member
0 Kudos

Ludek,

could I return a variable from the report to my application?

If I can stored a inset statement in a variable duriing the execution of the report and after the report finish your work I could return this variable to the app and there I can work with it and execute my insert statement.

Regards,

Bruno Mazziero

Answers (0)