I have to set a prompt which should have a option to select all values under the LOV’s.
Example:
Prompt: DEPTID: Select the values from list.
This Deptid field is coming from a database table. I can select a single deptid from the list and run the report. And even i can select all deptid’s from top to bottom under LOV’s and run the report.
But user looking for a option called “ALL DEPT” under list of values. I know we have option called wild card in crystal reports. Is there any way around can do in business objects designer or webi.
Created a new object in universe and implemented the condition shown below in where clause.
(@Select(Class\objectname) IN @Prompt(‘Select Dept’,‘A’,‘Class\objectname’,Multi,Free) ) OR ( ’ ALL’ IN @Prompt(‘Select Dept’,‘A’,‘Class\objectname’,Multi,Free))
Parsed OK.
Then clicked object properties
SELECT DISTINCT
Classname\objectname
FROM table
union
select ’ ALL’ from dual
Note: I tried to edit the properties but when i click on Sql button under select statement i am seeing where clause condition by default. Then i removed where clause condition and added " union select ’ ALL’ from dual.
Select the check button " Do not generate the Sql before running"
Then checked the box “Export with universe”
Again exported universe to the repository.
when i run sample report under prompt condition IT DOESN’T SHOW “ALL” but i am able too see each deptid under LOV’s.
(@Select(Class\objectname) IN @Prompt(‘Select Dept’,‘A’,‘Class\objectname’,Multi,Free) ) OR ( ’ ALL’ IN @Prompt(‘Select Dept’,‘A’,‘Class\objectname’,Multi,Free))
This is a pre-defined condition not object definition.
Create a pre-defined condition in universe with this code and use it directly in your report in the condition section.
I created two data providers from a single table. First data provider returns rows for current year(2008) based on DEPTID. Second data provider returns rows for previous year(2007) based on DEPTID. What if we dont have any data for previous rear(2007) for a particular deptid then it wont returns any rows but we have data for current year.
How can i get data for current year on report irrespective whether if there is no data for previous year for a particular deptid.
NOTE: As Anoop mentioned i created predefined condition and i’m able too see ALL under Deptid prompt. But when i select ALL in my prompt condition and run report it says no data to retrieve. However if i select departments into prompt condition and run the report it working fine. I imagine there is some issue with the pre-defined condition. Does anyone have idea what could be the issue?