cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the WESelect value.

Former Member
0 Kudos

Hi,

I 've created a WeSelect element such like :

WESelect ("WEIndex", "|2569|5221|2692", "|2569|5221|2692", "*", "")

I want to use the selected value in a formula.

Any code sample ?

Any help ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

JWiseman
Active Contributor
0 Kudos

hello,

any control value is a javascript variable and can be passed to a url, so you have two choices:

a) you can write a javascript formula in crystal to manipulate the value on the report where the control exists. in most cases such as yours the variable name will be the name that you assign to the control, i.e. WEIndex.

b) you can pass the value to the target report to the WEIndex prompt and manipulate the value using regular crystal syntax on the target report

you can not directly access the control value in a regular crystal formula but only use it the above 2 ways.

jw

Former Member
0 Kudos

Thanks JW,

In fact, i want to the WeSelect value to evaluate a formula which i'll use to hide/show sections depending on the selected value...

a) Is it possible using the WeSelect without hiting the database ? Basicaly using an existence instance of the document !?

b) If the answer above is "YES" then, how the formula evaluated on the Web Browser (Javascript) is passed to the PageServer to hide the sections?

Regards,

K.

JWiseman
Active Contributor
0 Kudos

hello K,

in xir2 and below there is not a way to process a url (which webelements does as it's final action) without hitting the database. unless each combination of your target report (all combinations of all prompts) is cached, you're going to get a data hit.

this means that any prompt used to hide or show a section in a report is going to force a data hit.

however, there may be an alternative to what you are trying to accomplish. which brings me to my question...what are you trying to do? i.e. what is the work flow that the end user will be going through?

jw

Former Member
0 Kudos

Hi JW,

The end user (we're talking about 4000 end users) will share a big report with a lot of sections..

Each user should be able to "see" every section but not all of the sections at the same time.

Hitting the DB would generate a BIG BIG slowdown...

I thought the WeSelect is part of the report and then uses the data already calculated.

If there is any alternative to do that..

Regards,

K.

PS:

1- I wonder if i am the first one wanting to "not hit the database" and make users share a big report ? Don't found any talk about this.

2- Is it an unsual use of Crystal Report to use instance of document and dynamically change the "view" according to external parameters?

JWiseman
Active Contributor
0 Kudos

hey K

one alternative would be to to use report part linking to bounce around to different sections of the report. report part linking does not necessarily require a prompt on the report and hence, with a saved data report, you can allow your users to go from section to section without a database hit.

so if you start off on a common "index" page then you can to the desired section without the negative performance hit. one suggestion to make it dynamic is to use a cross-tab in the report header that acts as the table of contents, and the report part linking from the cross-tab will go to the group header that matches the cross-tab value.

if you also create the report off of a business view, then you can have view time security which will filter out the saved data at run time, without a database hit, and hence all users will use the same big report with saved data. this would then pare down the index mentioned above to show only sections applicable to the end user. this would have to be set up to have a filter in the business view, but would be worth it to save on the database traffic.

again, the bad news...in xir2 and below as soon as you have a prompt on the report that does absolutely anything to the report (hides a section, changes a font size, filters existing data, etc. etc.) the reposting of the url will force a database hit.

now for the good news...crystal reports 2008 will allow you to reprompt against the report using the saved data and do basically anything that you want with it...hide sections using a prompt, pare down the saved data, switch from a crosstab view to a chart view (using conditionally suppressed / shown sections), etc. etc. it also has optional prompt features so that the end user will not have to enter all prompt values should they choose not to, even if those prompts are in a dcp set.

you may wish to download a trial copy of cr2008 just to try things out in the designer...please note though that cr2008 will not work with your xi or xir2 enterprise environment but at least you'll get an idea of what to expect later on and it will allow you to build content now. there is a webform viewer & a winform viewer to allow unmanaged dhtml viewing as well.

you can grab a trial at http://www.businessobjects.com/devxi/1183

Former Member
0 Kudos

Hi JW,

Thanks for all these solutions. I'll test each of them and make you know what.

I think the realy bad news is that CR2008 doesn't work with XIr2 :-).

Regards,

K.

Answers (0)