Question:
dynamic parameters as prompt in crystal report 10?
Maldita
2008-06-18 02:47:19 UTC
hi,
is there anyone who can help me with dynamic parameters as prompt? im working with these report and i cant get my parameter populated everytime i use a different database with the same tables and queries of course. the parameter should display a drop down list of users from the user table. thanks in advance
Three answers:
Jeff B
2008-06-20 10:14:12 UTC
Let me start by admitting that I haven't worked much with dynamic parameters.



I built a report that queries an Oracle database. The report simply queries every record in the ALL_TABLES view owned by the SYS user. I created a dynamic parameter named "test" that queries its values from ALL_TABLES.TABLE_NAME. I added a filter to the record selection criteria:



{ALL_TABLES.TABLE_NAME} = {?test}



The parameter and filter work fine. When I refresh the report and select a table name via the parameter, my report output only displays the table name that I selected via the "test" dynamic parameter.



I then changed my database to another Oracle DB via Database -> Set Datasource Location menu option. When I refreshed the report the dynamic parameter was still working... the report displayed the list of table names from the new database.





I'm not sure why you are having problems with our dynamic parameter. Are your schemas really identical? Does the user table have a different owner in each of the databases? Perhaps you can play around a little more and if you find more clues please add a comment to your question and I'll try to update my answer before the time runs out.





FYI, here's the Crystal Reports XI online help for dynamic parameters:





Creating a parameter with a dynamic prompt



The values of a dynamic prompt are retrieved from the data source and are not stored within the report. For example, if you are prompting for customer name, you could create a dynamic prompt because the names in your customer database probably change frequently.



Dynamic prompts can be authored in Crystal Reports Professional and Developer edition. You do not need BusinessObjects Enterprise or Crystal Reports Server to author dynamic prompts. When the Crystal Reports Developer edition is installed on the same machine as Microsoft Visual Studio, you can use the embedded Crystal Report designer to author dynamic prompts. When Crystal Reports is used with Crystal Reports Server or BusinessObjects Enterprise, additional features are available. For more information, see Managed reports.



Use the following steps to create a parameter that uses a dynamic prompt. As part of the procedure, you will create a list of values.



To create a parameter with a dynamic prompt

Open the sample report called Group.rpt.

Sample reports are located in the Crystal Reports directory under \Samples\En\Reports.



On the View menu, click Field Explorer.

The Field Explorer dialog box appears.



Select Parameter Fields and click New.

The Create New Parameter dialog box appears.



Enter a name for the parameter in the Name field (up to 255 alphanumeric characters).

This example uses Region.



In the List of Values area, click Dynamic.

Ensure that New is selected in the Choose a Data Source area.

Note: If your report already contains a list of values, or if you want to pick a list of values from your repository, you can select Existing and choose an existing list of values from the tree structure.



Click Insert, and from the Value list, select Region.

In the Value Options area, enter the desired prompting text in the Prompt Text field (up to 255 alphanumeric characters).

This is the text that appears in the "Enter prompt values" dialog box when the report is refreshed.Click OK.

Return to the Field Explorer dialog box, and drag the Region parameter into your report.

Note: If you don't want to see the parameter field you dropped in your report, place it in a section you can suppress, such as a report header or footer.



When you look at your dynamic prompt within Crystal Reports, it does not seem to be much different from a static prompt. In the background, however, Crystal Reports stores the information about the list of values that you created for this prompt. When the report engine requires a parameter that has a dynamic prompt, it will access the data source and populate the list of values automatically. This will be displayed on the end user prompt page. If you choose to publish the report to BusinessObjects Enterprise or Crystal Reports Server, the list of values becomes a separate entity that you can optionally schedule in Business Views Manager.
sobba
2016-12-18 01:11:33 UTC
Crystal Reports Dynamic Parameter
vineet
2008-06-19 22:12:39 UTC
hi,



hope this link will help u..


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...