FR and Stored Procedures?
Hello, my name is Darkwater and I have to work with an Interbase Database, with Stored Procedures and with FR 2.50. The last time I tried to use SP in my FR-Queries, it did not work. Is there a special function or object or Syntax, that are made for Stored Procedures?
The last times I have analyzed the Procedure and converted it in a Query, but that is not optimal for me. It needs much more time, and I am sure that you are the same oppinion, that it isn't good for the server. These Procedures are realized to ease the work of the Workstations, not for writing a lot of queries with the same result as the Stored Procedure.
My boss always says: Every Reporting Tool (...Which means Crystal Report, which he uses for a few years...) can use Stored Procedures, but I don't agree with him.
Could you tell me, whether or not FR can use Stored Procedures? I have found nothing in the help-files...
Darkwater
The last times I have analyzed the Procedure and converted it in a Query, but that is not optimal for me. It needs much more time, and I am sure that you are the same oppinion, that it isn't good for the server. These Procedures are realized to ease the work of the Workstations, not for writing a lot of queries with the same result as the Stored Procedure.
My boss always says: Every Reporting Tool (...Which means Crystal Report, which he uses for a few years...) can use Stored Procedures, but I don't agree with him.
Could you tell me, whether or not FR can use Stored Procedures? I have found nothing in the help-files...
Darkwater
Comments
Examples:
procedure TForm1.frReport1GetValue(ParName: String; var ParValue: Variant);
begin
if ParName = 'MyField' then
ParValue := Table1MyField.Value;
end;
procedure TForm1.frReport1UserFunction(const Name: String;
p1, p2, p3: Variant; var val: Variant);
begin
if AnsiCompareText('SUMTOSTR', Name) = 0 then
val := My_Convertion_Routine(frParser.Calc(p1));
end;
Interbase/Firebird has the ability to use stored procedures in selects. This might help you. You can make a Query out of the SP. Like this;
SELECT * FROM SP_NAME ('INPAR1')
Only difference is the WHERE clause that is change to (). You can have a paramater inside the (). There are some more about this, se the IB docs. You can also use a subselect like
SELECT T.ID, T.NAME, (SELECT A FROM SP (T.ID)) AS CALCULATED
FROM TABLE T
WHERE ...
hope this help /thoug it's off topic).
/D