Click to See Complete Forum and Search --> : crystal report query


ezaz_k
November 16th, 1999, 01:01 AM
Hello everybody!
I am using crystal report 4.6 vith v.b 5.0,
i created a standard report template using crystal reports,
now i want to use that template form a vb form so i placed a crystal reports ocx control on the form and run the report using Crystalreport1.action=1 command so it runs properly.But i want to modify the sql query of the crystal report form so i set the crystalreport1.sqlquery propertty to new query
but the report does not reflect the changes.
Please help me generate a dynamic report ,
how do i change the report at run-time?

Please Help

November 16th, 1999, 01:47 AM
Hi,
In my opinion what I get from your statement of Dynamic is that you want to add some extra criteria to the already existing criteria with which the crystallreport is created. For this make use of :
CrystallReport.SelectionFormula="You extra criteria"
(The above criteria will be appended to the already existing criteria)
And if your reprt is based on the Groups too then even that you can filter by:
CrystallReport.GroupSelectionFormula="You extra criteria"

Hope This Helps.

November 19th, 1999, 06:40 AM
Thanks For Your prompt response I could do with it .
But i want to pass a complete sql query or recordset to the report when i try to
pass sql using sqlquery property it gives me a sql server error with error code 20527.
If anybody can help me it wiil be great.

Thanks once again