locked
Crystal Report Doubt RRS feed

  • Question

  • User1828943426 posted

    hi all

    i have 4 detail section(A,B,C,D) on a report, this report creates 2 pages, A and B on one page, C and D on second page .

    now i do not want to show second page(detail section C and D) based on a condition in detail section A 

    is this possible if yes then where i should be writing the formula

    Wednesday, February 29, 2012 12:03 AM

Answers

  • User-37275327 posted

    Try this

    Not(('CONSOLE') in {CEPImages.Areas_Name})

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 29, 2012 5:32 AM

All replies

  • User-37275327 posted

    Yes,

    Right click on section then Section Expert. click the button on Suppress (No Drill-down). Write the condition there. Need to do each section.

    Wednesday, February 29, 2012 1:53 AM
  • User1828943426 posted

    but how can i get it done

    when i apply the below code in suppress(no drill down) formula section, CR hides the section without any true or false 

    stringvar array arrAreas;
    arrAreas := split({CEPImages.Areas_Name},",");

    numbervar i;

    for i:=1 to count(arrAreas) do
    (
    if arrAreas [i] = "Console" then
    (

    exit for
    )

    );

    any help would be great...

    thanks

    Wednesday, February 29, 2012 2:25 AM
  • User-37275327 posted

    CR suppress the section if condition is met. Do u want to suppress the section if area is 'Console'?

    Wednesday, February 29, 2012 3:12 AM
  • User1828943426 posted

    i am just checking in the array if an area CONSOLE exists,

    if it does then dont suppress the section

    how should i be writing the code

    Wednesday, February 29, 2012 3:59 AM
  • User-37275327 posted

    Then when to suppress the section? According to ur code, if array contain CONSOLE, seciton will be suppressed.

    Wednesday, February 29, 2012 4:28 AM
  • User1828943426 posted

    if array contains console i dont want to suppress it

    what is the condition i should put in the if loop

    Wednesday, February 29, 2012 4:43 AM
  • User1828943426 posted

    have used code this but still it suppresses the detail section C and D

    cant really understand where the fault lies

    stringvar array arrAreas;
    arrAreas := split({CEPImages.CP_V_Areas_Name},",");

    numbervar i;

    for i:=1 to count(arrAreas) do
    (
    if arrAreas [i] = "Console" then
    (
    false
    )
    )

    Wednesday, February 29, 2012 5:27 AM
  • User-37275327 posted

    Try this

    Not(('CONSOLE') in {CEPImages.Areas_Name})

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 29, 2012 5:32 AM
  • User1828943426 posted

    thanks for the generous help

    regards

    mark

    Wednesday, February 29, 2012 7:19 AM