Groups > dBase > dBase reports > Re: dbase 2.6 crystal report 8.5 and storedproc




dbase 2.6 crystal report 8.5 and storedproc

dbase 2.6 crystal report 8.5 and storedproc
Mon, 18 Jun 2007 06:31:43 -040
Hi all i'm using crystal report 8.5 with dbase 2.6. 

i need to print a report that take data form a stored procedure from 
mssql2000 with one parameter. 


Every time i try to print the report a window of crystal report come 
out asking me for the parameter to send to stored procedure but i 
have 
yet sent it with the code. 


here is the code i use in the form i hope someone can help me. thx 


form.storedproc1.params["@id_parameter"].value=form.id_parameter.value

form.storedproc1.requery() 
x = form.activex1.nativeObject 
x.ReportFileName="c:\asap\rpt\rad200.rpt" 
x.CopiesToPrinter=1 
x.Connect= "DSN=server1;UID=asap;PWD=sync;DSQ/DBQ=ARGENTO" 


x.ParameterFields(0) = '@ID_parameter;30,00;True' 


x.destination=0 
x.windowcontrols=true 
x.windowShowPrinterSetupBtn=true 
x.windowTitle="test" 
x.windowShowGroupTree=false 
x.WindowSearchBtn=true 
x.action=1 


thx a lot. 


Post Reply
Re: dbase 2.6 crystal report 8.5 and storedproc
Mon, 18 Jun 2007 07:41:38 -070
Sergio,

 IMO dBASE has problems sending parameters for a Crystal
Report. First don't send the param directly to the procedure,
you have to send it to the report. But ActiveX/RDC has problems
passing params.
 One work around would be to send the param value to the report
title via ActiveX/RDC. Then have a selection formula in Crystal that
uses the "Report Title" that satisfies the parameter. Did that make
sense?

HTH,
Bruce

"Sergio" <sergio.sbracia@email.it> wrote in message 
news:M%23kgdPZsHHA.1108@news-server...
> Hi all i'm using crystal report 8.5 with dbase 2.6.
>
> i need to print a report that take data form a stored procedure from
> mssql2000 with one parameter.
>
>
> Every time i try to print the report a window of crystal report come
> out asking me for the parameter to send to stored procedure but i
> have
> yet sent it with the code.
>
>
> here is the code i use in the form i hope someone can help me. thx
>
>
>
form.storedproc1.params["@id_parameter"].value=form.id_parameter.value

> form.storedproc1.requery()
> x = form.activex1.nativeObject
> x.ReportFileName="c:\asap\rpt\rad200.rpt"
> x.CopiesToPrinter=1
> x.Connect= "DSN=server1;UID=asap;PWD=sync;DSQ/DBQ=ARGENTO"
>
>
> x.ParameterFields(0) = '@ID_parameter;30,00;True'
>
>
> x.destination=0
> x.windowcontrols=true
> x.windowShowPrinterSetupBtn=true
> x.windowTitle="test"
> x.windowShowGroupTree=false
> x.WindowSearchBtn=true
> x.action=1
>
>
> thx a lot.
>
>
> 

Post Reply
Re: dbase 2.6 crystal report 8.5 and storedproc
Mon, 18 Jun 2007 13:56:00 -070
Sergio,

 This might be a better way. I'm not sure this will work, but
worth a try.

x.SectionFormula = "{?StoredProcedureParam} = 'cMyValue'"

Bruce

"Sergio" <sergio.sbracia@email.it> wrote in message 
news:M%23kgdPZsHHA.1108@news-server...
> Hi all i'm using crystal report 8.5 with dbase 2.6.
>
> i need to print a report that take data form a stored procedure from
> mssql2000 with one parameter.
>
>
> Every time i try to print the report a window of crystal report come
> out asking me for the parameter to send to stored procedure but i
> have
> yet sent it with the code.
>
>
> here is the code i use in the form i hope someone can help me. thx
>
>
>
form.storedproc1.params["@id_parameter"].value=form.id_parameter.value

> form.storedproc1.requery()
> x = form.activex1.nativeObject
> x.ReportFileName="c:\asap\rpt\rad200.rpt"
> x.CopiesToPrinter=1
> x.Connect= "DSN=server1;UID=asap;PWD=sync;DSQ/DBQ=ARGENTO"
>
>
> x.ParameterFields(0) = '@ID_parameter;30,00;True'
>
>
> x.destination=0
> x.windowcontrols=true
> x.windowShowPrinterSetupBtn=true
> x.windowTitle="test"
> x.windowShowGroupTree=false
> x.WindowSearchBtn=true
> x.action=1
>
>
> thx a lot.
>
>
> 

Post Reply
Re: dbase 2.6 crystal report 8.5 and storedproc
Mon, 18 Jun 2007 19:21:04 -070
Sergio,

 Sorry, After thinking about this, my ideas should not work.
You could however, remove the parameter from the stored
procedure and then pass the formula selection. But that could
be slow depending on how much data your sproc returns with
out the parameter.

HTH,
Bruce

"Sergio" <sergio.sbracia@email.it> wrote in message 
news:M%23kgdPZsHHA.1108@news-server...
> Hi all i'm using crystal report 8.5 with dbase 2.6.
>
> i need to print a report that take data form a stored procedure from
> mssql2000 with one parameter.
>
>
> Every time i try to print the report a window of crystal report come
> out asking me for the parameter to send to stored procedure but i
> have
> yet sent it with the code.
>
>
> here is the code i use in the form i hope someone can help me. thx
>
>
>
form.storedproc1.params["@id_parameter"].value=form.id_parameter.value

> form.storedproc1.requery()
> x = form.activex1.nativeObject
> x.ReportFileName="c:\asap\rpt\rad200.rpt"
> x.CopiesToPrinter=1
> x.Connect= "DSN=server1;UID=asap;PWD=sync;DSQ/DBQ=ARGENTO"
>
>
> x.ParameterFields(0) = '@ID_parameter;30,00;True'
>
>
> x.destination=0
> x.windowcontrols=true
> x.windowShowPrinterSetupBtn=true
> x.windowTitle="test"
> x.windowShowGroupTree=false
> x.WindowSearchBtn=true
> x.action=1
>
>
> thx a lot.
>
>
> 

Post Reply
Re: dbase 2.6 crystal report 8.5 and storedproc
Tue, 19 Jun 2007 05:12:09 -070
Sergio,

 Yea, If you dealing with a lot of data, I think your right.

Bruce

"Sergio" <sergio.sbracia@email.it> wrote in message 
news:A%23qEeplsHHA.1648@news-server...
> Thx a lot Bruce...
>
> I cann't use the storedproc without params i'll have too much record.
>
> i think that the only solution is to create a dbf a put in all the data 
> and let crystal report to read data from the dbf.
>
> thx a lot again.
>
>
>
>
> Bruce Mercer Wrote:
>
>> Sergio,
>>
>>  IMO dBASE has problems sending parameters for a Crystal
>> Report. First don't send the param directly to the procedure,
>> you have to send it to the report. But ActiveX/RDC has problems
>> passing params.
>>  One work around would be to send the param value to the report
>> title via ActiveX/RDC. Then have a selection formula in Crystal that
>> uses the "Report Title" that satisfies the parameter. Did
that make 
>> sense?
>>
>> HTH,
>> Bruce
>>
>> "Sergio" <sergio.sbracia@email.it> wrote in message
>> news:M%23kgdPZsHHA.1108@news-server...
>> > Hi all i'm using crystal report 8.5 with dbase 2.6.
>> >
>> > i need to print a report that take data form a stored procedure
from
>> > mssql2000 with one parameter.
>> >
>> >
>> > Every time i try to print the report a window of crystal report
come
>> > out asking me for the parameter to send to stored procedure but i
>> > have
>> > yet sent it with the code.
>> >
>> >
>> > here is the code i use in the form i hope someone can help me.
thx
>> >
>> >
>> >
form.storedproc1.params["@id_parameter"].value=form.id_parameter.value

>> > form.storedproc1.requery()
>> > x = form.activex1.nativeObject
>> > x.ReportFileName="c:\asap\rpt\rad200.rpt"
>> > x.CopiesToPrinter=1
>> > x.Connect=
"DSN=server1;UID=asap;PWD=sync;DSQ/DBQ=ARGENTO"
>> >
>> >
>> > x.ParameterFields(0) = '@ID_parameter;30,00;True'
>> >
>> >
>> > x.destination=0
>> > x.windowcontrols=true
>> > x.windowShowPrinterSetupBtn=true
>> > x.windowTitle="test"
>> > x.windowShowGroupTree=false
>> > x.WindowSearchBtn=true
>> > x.action=1
>> >
>> >
>> > thx a lot.
>> >
>> >
>> >
>>
>>
> 

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact