How to display the dataset column value in text box in the parameter page of the report

Hello,

I have created a report, containing a dataset with only one column. When i run the report, I would like to show that dataset result in textbox in the parameter page of the report.

Example:
Dataset: Select name from table where id = 2; Output = Sai

Now i would like to display that output "Sai" in the textbox by default in the parameter page when i run that report.
bobbb
I have tried in many ways but i am unable to show it. Atlast i have tried with listbox but the listbox is showing blank (until the user select that value in the list) - For this i applied "is required" it was working good in my local birt viewer, but still showing the same blank listbox with red line border.

Could anyone please suggest any idea? as it was an urgent requirement.

Thanks,
Sai

Thanks & Regards,
Sai

Best Answer

  • Accepted Answer

    There "bobbb" is a typo error please ignore it.

    Thanks,
    Sai

    @Sai Krishna said:
    Hello,

    I have created a report, containing a dataset with only one column. When i run the report, I would like to show that dataset result in textbox in the parameter page of the report.

    Example:
    Dataset: Select name from table where id = 2; Output = Sai

    Now i would like to display that output "Sai" in the textbox by default in the parameter page when i run that report.
    bobbb
    I have tried in many ways but i am unable to show it. Atlast i have tried with listbox but the listbox is showing blank (until the user select that value in the list) - For this i applied "is required" it was working good in my local birt viewer, but still showing the same blank listbox with red line border.

    Could anyone please suggest any idea? as it was an urgent requirement.

    Thanks,
    Sai

    @Sai Krishna said:
    Hello,

    I have created a report, containing a dataset with only one column. When i run the report, I would like to show that dataset result in textbox in the parameter page of the report.

    Example:
    Dataset: Select name from table where id = 2; Output = Sai

    Now i would like to display that output "Sai" in the textbox by default in the parameter page when i run that report.
    bobbb
    I have tried in many ways but i am unable to show it. Atlast i have tried with listbox but the listbox is showing blank (until the user select that value in the list) - For this i applied "is required" it was working good in my local birt viewer, but still showing the same blank listbox with red line border.

    Could anyone please suggest any idea? as it was an urgent requirement.

    Thanks,
    Sai

    @Shweta Parihar said:
    I have created a sample report where the dataset result is shown as a parameter default value. I am using List Box for the Parameter and to populate this List Box I selected "Dynamic" option in "Edit parameter" window and set the parameter default value here. Attaching the report for your reference.

    Thank you Shweta....

    Thanks & Regards,
    Sai

Answers

  • I have created a sample report where the dataset result is shown as a parameter default value. I am using List Box for the Parameter and to populate this List Box I selected "Dynamic" option in "Edit parameter" window and set the parameter default value here. Attaching the report for your reference.

  • I think question is for TextBox not Listbox. Any way we can have default value in Text box which is editable?

  • In BIRT, in the parameter editor, there are settings to add a default value. Have you tried setting a default value? What specifically does not work? Please include a screenshot or sample if possible.

    Jeff F.
    Customer Support Engineer I
    OpenText
  • Hi Jeff.
    Basically my requirement is simple.
    Fetch the max date from the database and set it in a Text-box parameter.

    Currently I can do this by using Listbox and combobox and setting value as dynamic but is there way on initialization time itself I can see my max date in a text box parameter.

  • edited August 30

    In the commercial version (16.4 and higher) of the Designer, there is a built-in function called "BirtData" that can run a Data Set to retrieve a default value for a Text Box parameter. I did a search on this topic for OS BIRT. The combo box was the best option I saw. The only other option I can think of is to create a driver report that retrieves the value and then opens the target report passing in the retrieved value as a parameter.

    For the scenario you described (max date), if all of the dates in the report are historic (i.e. past transactions), there should be no difference between using the current date and using the max date from the database in terms of filtering the data. For example, say the dates in the database are from 2012 to 2016. If the user sets the parameter value to 2016-12-31 (the max value in the database) the report will display the same data as if they set the parameter value to the current date. So you could just set the default parameter value to the current date and not mess with getting the max date from the database. If some of the dates in the database are in the future, you can get the current date and add years to it to make sure the default value is greater than the highest date value in the database.

    Jeff F.
    Customer Support Engineer I
    OpenText
Sign In or Register to comment.