Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Parameter s not showing as list but blank

Status
Not open for further replies.

netchie

Technical User
Jun 5, 2013
10
US
Hi,

I am new using Crystal Report and newbie on this forum :)

I just converted CR to 2008 and when I ran my report templates, some parameters are not showing as list but blank fields to fill in. I'm already pulling my hair because I couldn't fix them :( Can you please help me?


Thanks in advance.
Nanette
 
Select the parameter and choose edit.
Check the list of values has the radio button for "dynamic" checked and is pointing to the field with the options you wich to choose from e.g. country, city,person etc...
CR may have defaulted the parameter to static and so is expecting you to type something in.
The dynamic choice means user will choose from the options in the DB for that field.
Difference being:Dynamic- I can't choose Mary if she isn't in the list, but static would mean I could choose Mary but no data would be shown for her because her data isn't in the list
(I think, I rarely use static)
 
Hi NickieP,

Thanks for replying. Yeah, I compared the parameter from the old version and they are all the same. There is one thing that I noticed while I was moving it to the new version. It says name-role-id field is missing under Command. This is the SQL query when I opened the Command :

select person_relation.name as auditor
from login login
inner join name_relation name_relation
on login.name_rel_id = person_relation.id
inner join name_role user_role
on login.name_role_id = name_role.id
where user_role.name = 'Employee'

Is there a way to easily find this name_role_id, maybe a SQL or something to run? There's so many table that I don't know which of them has this field :(


netchie
 
Try
database, set datasource location

in the bottom pane, find the new connection(ODBC etc)and the DB

With the table or whole DB highlighted in the top pane(current data) highlight the corresponding table or DB in the bottom pane(replace with)
-if they agree(such as if pointing a test DB report to a live DB where table & field names match) the button on the right: "UPDATE" will be enabled
and it will change so LIVEDB is the source i/o TESTDB
If you had renamed the previous datasource tables as TESTCustomer it will still show the alias even though it points to the new DB and is infact LiveCustomer.(where real table name in both is just customer)
Don't worry, it will match like table names and the fields for you.

If when swapping the old DB field used name_role_id is not found in the new DB, it will prompt you to choose a new field to use from one not already mapped in the same table.
It will look for data type match so if numeric, it will suggest all unmapped numeric fields for name_role_id,to map with.
This may show "name_role_id_no" or something similar so you can see what the new field name is for the same data.
Maybe it's easy to spot: "name_role_id" can be remapped to "name_role_id_no" or something
The report will understand the new name/field to use and all should be OK. Your SQL will then be correct
Save as a new version so you don't lose the original version.
 
Hi NickieP,

When I moved the report template to the new database location (clicked Update, etc.) It says name_role_id does not found and the only thing I could click is to click OK so I did. Then it opened the report template. It didn't prompt me to choose a new field to use. When I browse the Name under Command, it's not showing the data list; it's blank and that's one of the parameters. The template just opened so I refresh it and 2 fields have the same issue (not showing as list).
 
Here is the attachment and the complete situation. If anyone could help me, that would be great! :)

I am working on Crystal Report 2008. After moving the report template to the new version of CR and app, the Command field with SQL Query is not working properly anymore. Basically, the old version Parameters has the list of Auditor names and the Site as well. After the conversion to the new version, I clicked Refresh button, the Auditor and Site fields don't show as Dynamic parameter (as list) although the parameter itself shows as dynamic parameters but instead it's showing as blank fields. It seems that it's not pulling up the correct data table/fields.

The old version Command field has this SQl Query:

[blue]select person_relation.name as auditor
from login login
inner join person_relation person_relation
on login.person_rel_id = person_relation.id
inner join user_role user_role
on login.user_role_id = user_role.id
where user_role.name = 'Auditor'[/blue]

Attached are the tables for old and new versions. Some of the fields don't exist to the new version anymore and I don't know how I'm going to fix the old SQL query. Can somebody please help me?


Thanks in advance.

netchie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top