Using MoveIt Controls for Cascading parameters

Discussions related to Crystal Reports development.

Moderator: Lisa Ennis

Post Reply
tlyde_LCTMHS
Posts: 8
Joined: Thu Jul 18, 2013 12:21 pm

Using MoveIt Controls for Cascading parameters

Post by tlyde_LCTMHS »

Hi,

I am trying to create cascading input parameters. I have State, City, and County. I obtain a list of states and then choose cities from the states chosen. I can get the list of cities to populate when the State control is a combo box limited to 1 input but not when I change it to a Move It control. I'm not sure if there is a problem with my SQL statement or if I can't use the Move It controls. Below is my SQL statement when States is a Move It control. States is a Move It control, the Cities do not populate.

PropertyStateMove
SELECT PropertyState FROM dbo.ParameterValuesByProfilePropertyState({PROFILEID})
PropertyCityMove
SELECT distinct City FROM dbo.Property where State in ({PropertyStateMove})

Thanks
Lisa Ennis
Posts: 84
Joined: Thu Sep 11, 2008 1:57 pm

Re: Using MoveIt Controls for Cascading parameters

Post by Lisa Ennis »

You are limited to use combo box parameters as a cascading parmeter through the Select program. In your example, the State would need to be a combo type parameter. It can cascade to a move it type parameter, but not from one.

Also, due to database permissions, users often do not have direct access to the tables, so you would want to write your select statements to select from a view or a function instead of directly from the table as you have done with the PropertyCityMove.

So your code would look like this:
PropertyStateCombo
SELECT PropertyState FROM dbo.ParameterValuesByProfilePropertyState({PROFILEID})
PropertyCityMove
SELECT distinct City FROM dbo.ParameterValuesPropertyCity where State = ({PropertyStateCombo})

If there is not a view for the property city, you would need to create one.

Hope this helps.
Lisa Ennis
Senior Report Developer
SoftPro
Post Reply