Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Formula - Parameter filter (Help) Post Reply Post New Topic
Author Message
RavensAngel
Newbie
Newbie


Joined: 02 Jul 2008
Online Status: Offline
Posts: 4
Quote RavensAngel Replybullet Topic: Formula - Parameter filter (Help)
    Posted: 02 Jul 2008 at 11:21pm
Hi all,
 
i was wondering whether someone has some experience in crystal reports to make the following happen:
 
i have a table in my database with ID, NAME and DESC
 
i was able to make a filter based on a parameter ID...
something like
 
if {Param_ID} > 0
then
{db.NAME} = {Param_ID}
 
but now i want to have a filter that allows me to filter on name?!
Example:
     Show all items where NAME begins with {Param_Name}
 
Is this possible? And how?
 
 
Already thank you!
IP IP Logged
RavensAngel
Newbie
Newbie


Joined: 02 Jul 2008
Online Status: Offline
Posts: 4
Quote RavensAngel Replybullet Posted: 08 Jul 2008 at 4:01am
Ok,
 
i figured it out but i still have a question!
 
so i created a stored procedure within MySql which takes a parameter
 
something like this:
 
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllItems`(in p_Name varchar(50) )
BEGIN
SELECT *
FROM item
WHERE Name like p_Name;
END $$
 
 
Now when i try to connect via the database expert to my SP, it fails giving me an error like:
Query Engine Error: 'HY000:[MySql][....] Incorrect number of arguments for Procedure dbgeluid.GetAllItems; expected 1, got 0
 
so i tried via another way, using the Add Command functionality.
So i tried to add a new Sql Query typing:
call GetAllItems( {?sp_Name} )  
where sp_Name is a parameter i made in the "Parameter List".
When i try to apply this (by clicking "OK"), the system asks me for a discrete Value. I fill in a correct value and all is well...
 
So now the question:
 
Why can't i add the Stored procedure directly? Is this normal or am i doing something wrong?
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.077 seconds.