Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Conditional Display Of group Sections In Crystal Reports 2011

Hi Every one good evening,please guide me how to achieve this requirement.

In My report i have 2 Sections.In one section we have a group based on category filed(coming from store template table)

In one section we have a group based on Brand filed(coming from store template table)

1.Category

2.Brand

All 2 sections have some fields(fields are same for all groups).

I need to display a specific section based on some value(Prop value) selected in database.

Prop value is a column from Cust_conv_properties table.

If in database they gave Prop value=Category then i have to show Category group section data

If in database they gave Prop value=Brand then i have to show Brand group section data.

How can i achieve this.Please guide me.

Please find the attachments.

Addtional to this

I want to try like this, for category field i will take one report and i will apply group on category, for brand field i will take another report and i will apply group on brand then,I will merge this in to one report.

So now how to show/hide these reports based on prop value selected in data base table.(how to link)

Suggest me.

Database table.gif (207981 B)
ReportDesign.gif (123701 B)
Tags:
Former Member
Former Member replied

OK . . . it sounds like . . . .

1.  You a have a main report using Cust_conv_properties table as your data source. 

2.  There are two sub-reports in your main report.  The sub-reports are sr_BRAND and sr_CATEGORY.

3.  For each record in the main report you want to display one sub-report. 

     if [Cust_conv_properties.prop_value] = “category” then display sr_CATEGORY.

     if [Cust_conv_properties.prop_value] = “brand” then display sr_BRAND.

My solution would be

     1.  go to the section expert (Report > Section expert)

     2.  select the Details section

     3.  insert two detail sections

            Details a:  this section contains the fields from the Cust_conv_properties table

            Details b:  this section contains  sr_BRAND

            Details c:  this section contains sr_CATEGORY

     4.  Select the Details b section and add a formula to Suppress the section when [Cust_conv_properties.prop_value] <> “brand”

     5.  Select the Details c section and add a formula to Suppress the section when [Cust_conv_properties.prop_value] <> “category”

     6.  Close the Section Expert

     7.  Insert your subreports in section Details a and Details b

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question