cancel
Showing results for 
Search instead for 
Did you mean: 

Web Elements - Dynamic Cascading Parameters

Former Member
0 Kudos

Hi

I have Dynamic Cascading parameter to be implmented for col1 and col2 i.e when i select col1 corresponding col2 values to be displayed based on col1.

My question is , (1) is it necessary that we have to pull all the values for col1 and col2 to be pulled first on the subreport and then do the filter on main report. (2) Is it not possible to select col1 value and then hit to database directly to fetch corresponding col2 values skipping the question (1).

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

(1) is it necessary that we have to pull all the values for col1 and col2 to be pulled first on the subreport and then do the filter on main report.

*How is that Subreport coming into picture.? You have set the cascading parameters for main report that solves your problem, right? if not please elaborate on what exactly you are looking for.

(2) Is it not possible to select col1 value and then hit to database directly to fetch corresponding col2 values skipping the question (1).

Yes it is possible.

Former Member
0 Kudos

I want Dynamic cascading parameters with respect to web elements. can we create Dynamic cascading parameters on a single report? or does it require main and sub-report? If not cant col2 values display automatically based on col1 by pulling from the database. If yes, pls provide me example

JWiseman
Active Contributor
0 Kudos

hello,

you can actually stage a report using a single select menu. i am assuming that you are still trying to find a workaround for the character limit in crystal reports.

i will be posting a sample to my blog within a couple of days that shows how to "stage" a prompt page report using only one select menu.

i will let you know in this forum post when the blog contents are publicly available.

cheers,

jamie

Former Member
0 Kudos

Jamie

Thank you for the concern.

Please help to provide the contents which would really resolve the problem.

Former Member
0 Kudos

Ok. I think, you can create cascading parameters in the main report, with out subreport. Your second scenario where you want to pull the second parameters list of values bsed on the first parameter is still possible with the use of subreports and formuael.

I hope iam meeting your expectation. Nevertheless, what you mean by "based on web elements"?

My answer is a general scenario any any datasource.:)

JWiseman
Active Contributor
0 Kudos

hi Mohammad,

webelements is the add-on for crystal reports that allows you to embed web controls directly on a crystal report.

select / menu controls can have hard coded values or run against live data.

you can find out more about webelements or download them [here|].

cheers,

jamie

Former Member
0 Kudos

Hi Jamie,

Need your help for below questions with some sample code if feasible

1) Dynamically hitting database when we select a value from first level to get the second level values.

Using web elements, is there any possibility to get List of values in second level dynamically by hitting the database when we select a value from the first level ?

Eg- first level-MFG, second level-SKU

Actually we have less than 600 SKU values for each MFG. But total SKU values are around 3000.

Based on the sample report DCP, we implementing dynamic cascading prompts for our report.

2) Validation testing for entered value in the text box

Also we have one more prompt in our report where users have to manually enter a value in the text box.

But they want to validate the entered value with the database field value.

If they enter a wrong value, which is not there in the database, then they want a message box saying that u201CPlease enter a correct valueu201D.

Appreciate your response.

Thanks

JWiseman
Active Contributor
0 Kudos

hello,

unfortunately you can only ask one question per forum post.

please read the rules of engagement for the forums.

- Only One Question Per Posting

For each question that you have, make a separate posting. Don't ask multiple questions in one posting, this is confusing for people and might not get answered, since the subject line does not reflect all your problems. If a new and unrelated question comes up during a thread, start a new thread.

Former Member
0 Kudos

Hi Jamie,

Need your help for below question with some sample code if feasible

1) Dynamically hitting database when we select a value from first level to get the second level values.

Using web elements, is there any possibility to get List of values in second level dynamically by hitting the database when we select a value from the first level ?

Eg- first level-MFG, second level-SKU

Actually we have less than 600 SKU values for each MFG. But total SKU values are around 3000.

Based on the sample report DCP, we implementing dynamic cascading prompts for our report.

JWiseman
Active Contributor
0 Kudos

hello Mufiza,

please check out my blog at

/people/jamie.wiseman/blog/2009/11/24/staging-webelements-controls

sometime next week.

NOTE: the sample is not available quite yet...there is a delay between when the blog is published and when i can put a link to the sample.

once the sample has been uploaded to SDN, i will edit this blog entry to include a link to the sample. sorry for the inconvenience.

regarding the content, i have create a sample report that stages a single select menu. the end user will see the first stage as a select menu...

Stage 1

- they can choose a Country and then pass the Country to a target report which is displayed in an iframe

- or they can choose a Country and press a link to activate the related States / Provinces

Stage 2

- now they can choose a State / Province and then pass the State / Province to the target report

- or they can choose a State / Province and press a link to activate the related cities

Stage 3

etc.

also, at any stage, the end user can press a "reset" link to go back to the very first stage. this report has saved data for all of the select menu data and therefore there is no database hit each action...for cr2008 only.

cheers,

jamie

Former Member
0 Kudos

If you could put the data in blog today that would be more helpful.

Thanks

Former Member
0 Kudos

in the blog you mentioned

(if {?stage} > 1 then {Customer.Country} + wespace(2) + ">" + wespace(2)) +

(if {?stage} > 2 then {Customer.Region} + wespace(2) + ">" + wespace(2)) +

(if {?stage} > 3 then {Customer.City} + wespace(2) + ">" + wespace(2)) +

what does stage > 1 indicates ?

Former Member
0 Kudos

{?stage} is the paraemter!

Former Member
0 Kudos

This is with respect to the blog provided by Jamie. In that he had mentioned stage >1 ... what >1 refers to ? So Please let him expain.

Former Member
0 Kudos

Hi Jamie

I am able to select a value from the first level list box, and after selecting the link "Accept fist level and goto second level" , it is not passing and the SKU values are not displaying.

Not able to understand the code which you have provided for this link (@select menu)

whileprintingrecords;

stringvar menuvalues;

(if {?stage} >1 then {Command.MFG_LOCTN} + wespace(2) + ">" + wespace(2)) +

(if {?stage} >2 then {Command.SKU_NUM} + wespace(2) + ">" + wespace(2)) +

WESelect ("selectmenu", menuvalues,menuvalues,{?selectmenu},{@commonfont})wespace(2){@ResetLink}

Please suggest on what may be going wrong.

Thanks

JWiseman
Active Contributor
0 Kudos

the report is staged from country (stage = 1) to region (stage=2)....down to customer. the stage parameter is used to conditionally change the report and is passed via opendocument back into the report upon any end user action.

the various stages of the report are explained above in this forum.

Former Member
0 Kudos

We just wanted to know what does stage > 1 indicates. i mean greater is pointing to what.

JWiseman
Active Contributor
0 Kudos

if the end user is on stage 1 only a country select menu is shown.

if the end user is on stage 2 the country they have chosen is shown and a region select menu is shown.

i would ask that you install the sample and run through the staging of the report as running the sample demonstrates what the stages are, what is displayed in each formula, etc.

Answers (0)