Skip to Content
author's profile photo Former Member
Former Member

Parameters in SQL File


I have an SQL File in Eclipse which uses a String parameter. When i try to send it to "Crystal Reports->Add to New Report" a message says that there is an error in the sql sentence.

I was wondering if there is a way to use an SQL file with parameters in Crystal Reports for Eclipse.

This is my SQL:

SELECT substr(factura.fanum,1,6),sum(dfimp)

FROM factura,detfact


factura.fanum=detfact.fanum AND

detfact.dftip='TM' AND

factura.fadgen<=&1 AND

(factura.fadcob IS NULL OR (factura.fadcob IS NOT NULL AND factura.fadcob>&1)) AND

(factura.fadbaixa IS NULL OR (factura.fadbaixa IS NOT NULL AND factura.fadbaixa>&1)) AND

(detfact.dfdbaixa IS NULL OR (detfact.dfdbaixa IS NOT NULL AND detfact.dfdbaixa>&1)) AND

0 = (SELECT count(*)

FROM devfact

WHERE devfact.fanum=factura.fanum AND

fadcob<=&1 AND


GROUP BY substr(factura.fanum,1,6)

Thanks in advance

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Nov 15, 2009 at 10:39 PM

    Not possible. You cannot edit the SQL a report generates which also tells you you can inject a SQL statement into a report. The report generates the SQL it requires when creating the report.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.