Hiding empty columns in report builder

Hi,
This is my first adventure with report builder and I have
managed to produce some custom labels which work almost perfectly.
I say almost because there is one thing I can't seem to do.
I have a label for addresses. The address data consists of
data from a query including, name,
address1,address2,address3,town,county,postcode.
Some of these are quite often empty but the label still
displays a line break and the ',' at the end so I might end up
with:
Dave Phipps
27 Acacia Road,
MyTown,
MT1 4JP
In the above address the fields address2, address3 and county
are empty.
How do I set this up in Report Builder to hide the missing
lines so that I would end up with:
Dave Phipps
27 Acacia Road,
MyTown,
MT1 4JP
Any ideas?
Cheers,
Dave

Hi,
If i understood your question correctly,
The you can try this
TYPE-POOLS:slis,abap.
TYPES:BEGIN OF ty,
      f1 TYPE c,
      f2 TYPE c,
      f3 TYPE c,
      f4 TYPE c,
      END OF ty.
DATA:it TYPE TABLE OF ty,
     wa TYPE ty,
     wa_field TYPE slis_fieldcat_alv,
     i_fieldcat TYPE TABLE OF slis_fieldcat_alv,
     i_details TYPE abap_compdescr_tab,
     wa_comp TYPE abap_compdescr,
     ref_descr TYPE REF TO cl_abap_structdescr,
     lv_field TYPE abap_compname.
FIELD-SYMBOLS:<fs>,
              <fs1>.
ref_descr ?= cl_abap_typedescr=>describe_by_data( wa ).
i_details[] = ref_descr->components[].
wa-f1 = 'A'.
wa-f3 = 'C'.
APPEND wa TO it.
wa-f1 = 'X'.
wa-f3 = 'Y'.
APPEND wa TO it.
if it[] is not initial.
LOOP AT i_details INTO wa_comp.
  ASSIGN wa_comp-name TO <fs>.
  SORT it BY (<fs>) DESCENDING.
  CONCATENATE 'WA' '-' <fs> INTO lv_field .
  ASSIGN (lv_field) TO <fs1>.
    READ TABLE it INTO wa INDEX 1 transporting (<fs>).
  IF sy-subrc = 0 AND <fs1> IS NOT INITIAL.
    wa_field-fieldname = wa_comp-name.
    wa_field-seltext_m = wa_comp-name.
    APPEND wa_field TO i_fieldcat.
  ENDIF.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = sy-repid
    it_fieldcat        = i_fieldcat[]
  TABLES
    t_outtab           = it[].
endif.

Similar Messages

  • How to find the maximum of group sums within a specific column using report builder 3.0

    Hi
    For each part number I am trying to find out in which week of a month did the largest daily shipment occur... so using report builder 3.0
    in SSRS 2012 I can find daily, weekly and monthly totals for the units shipped but I am having a hard time thinking through the logic to find the daily max for each week.
    in my data I can have multiple orders/shipments for the same product on the same day.
    The ultimate goal is to set inventory levels
    So..
    In my matrix report I have
    Row groups:
    Classid => Product class
    InvtID => Item Part Number
    Column Groups:
    FiscYr=> Fiscal Year
    PerPost => Month or period the transaction occurred
    Week_period => the week the transaction occurred
    Day_period => The day that the transaction occurred
    The aggregations are 
    Sum(case_shipped) 
    Max(case_shipped)
    The Sum(case_shipped) is working as desired but the Max(case_shipped) is picking out the max amount shipped on any one order when looking
    at the week, month or fiscal period and that is not what I need.
    I have attached a screenshot since a picture is worth more than my words. I have also included some sample data
    I would very much appreciate any thoughts on this. I am guessing that the solution has something to do with using the inscope function but
    I can't wrap my head around how to use it
    Thank you 
    Tom D
    Here is some sample data for Product A
    Invtid Case_ship Trandate    FiscYr   PerPost   week_period        day_period
    A         10           1/1/2104    2014        1    
              1                           1
    A           3           1/1/2014    2014        1  
                1                           1
    A         50           1/2/2104    2014        1    
              1                           2
    A         30           1/3/2014    2014        1    
              1                           3
    A         20           1/9/2104    2014        1    
              2                           2
    A          5            1/9/2104    2014        1  
                2                           2
    A        20          1/10/2014    2014        1    
              2                           3
    A        60          1/10/2104    2014        1    
              2                           3
    On 1/1/2104 I shipped a total of 13 cases
    On 1/2/2104 I shipped a total of 50 cases
    On 1/3/2104 I shipped a total of 30 cases
    On 1/9/2014 I shipped a total of 30 cases
    On 1/10/2014 I shipped a total of 80 cases
    On 1/9 I shipped a total of 25 cases
    I would like to show that in week 1 the maximum number of cases shipped on any day is 50 (1/2/2014)
    I would like to show that in week 2 the maximum number of cases shipped on any day is 80 (1/10/2104)
    I would also like to show that in perpost (month) 1 the maximum
    number of cases shipped on any day is 80 (1/10/2104)

    Hi
    I was able to find a solution
    I built a new dataset in report builder using the same table as before but tried out the "Group and Aggregate" function and for the case_ship
    field I chose "Sum" as my aggregate.... In essence this gave me a very cool and easy daliy sum of the shipped cases. 
    When I used this new dataset and built my matrix report I was able to easily get the max daily shipment for each product by week, month and
    year.
    Tom

  • How to get two empty columns in reporting?

    Hi Experts,
    How to get Two empty columns in  a report, i have taken a formula and i have given '=0' in the formula box after executing the query that two columns containing zero's, but i don't want zero's, i want to display empty columns.
    pl help to do this,
    thanks & regards
    venakt

    Hi
    In the Query designer go to Properties and Select Active n Zero Supression
    also select Supress Zeros from the drop down.
    Regards
    M.A

  • Hiding empty columns in ALV

    Hi all,
    I want to hide some columns in ALV which are empty on display when calling
    cl_gui_alv_grid->set_table_for_first_display
    That is to say the internaltable will contain empty columns.
    I know that using the "no_out" attribute of field catalog we can hide columns.
    But the question is how to find these columns which are empty - should I have to loop through the itab to find it out OR
    Can we set it in ALV LAYOUT or field catalog attributes so that it wont display empty columns.
    any help is appreciated....
    Thanks
    P
    Edited by: pazzuzu on Mar 12, 2010 5:14 PM

    Hi,
    If i understood your question correctly,
    The you can try this
    TYPE-POOLS:slis,abap.
    TYPES:BEGIN OF ty,
          f1 TYPE c,
          f2 TYPE c,
          f3 TYPE c,
          f4 TYPE c,
          END OF ty.
    DATA:it TYPE TABLE OF ty,
         wa TYPE ty,
         wa_field TYPE slis_fieldcat_alv,
         i_fieldcat TYPE TABLE OF slis_fieldcat_alv,
         i_details TYPE abap_compdescr_tab,
         wa_comp TYPE abap_compdescr,
         ref_descr TYPE REF TO cl_abap_structdescr,
         lv_field TYPE abap_compname.
    FIELD-SYMBOLS:<fs>,
                  <fs1>.
    ref_descr ?= cl_abap_typedescr=>describe_by_data( wa ).
    i_details[] = ref_descr->components[].
    wa-f1 = 'A'.
    wa-f3 = 'C'.
    APPEND wa TO it.
    wa-f1 = 'X'.
    wa-f3 = 'Y'.
    APPEND wa TO it.
    if it[] is not initial.
    LOOP AT i_details INTO wa_comp.
      ASSIGN wa_comp-name TO <fs>.
      SORT it BY (<fs>) DESCENDING.
      CONCATENATE 'WA' '-' <fs> INTO lv_field .
      ASSIGN (lv_field) TO <fs1>.
        READ TABLE it INTO wa INDEX 1 transporting (<fs>).
      IF sy-subrc = 0 AND <fs1> IS NOT INITIAL.
        wa_field-fieldname = wa_comp-name.
        wa_field-seltext_m = wa_comp-name.
        APPEND wa_field TO i_fieldcat.
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program = sy-repid
        it_fieldcat        = i_fieldcat[]
      TABLES
        t_outtab           = it[].
    endif.

  • Hiding Null columns in report

    Is it possible to hide a column is the entire column is null, but to show it where there's value in it? I was wondering if this can be done automatically in report, thanks!
    Helen

    How would one go about conditionally showing a column in the rows section of a pivot table if all values or null?

  • Hiding a column in report

    HI Apex Community
    I want to hide a column in a report based on an item(#item#) of the same report .
    for ex , if invoice is zero then hide DUE row of that particular client
    I tried with condition value is null equal to #invoice# but it hide the whole column instead of individual column.
    Pls suggest me how to implement this .
    apex 4.1.1 oracle 11gR2 , oc4j , linux.
    thank you

    I've tried this sort of thing before - so you want to add a link if data is present?
    yes when data is present then only show the link else hide link/image
    Under region attributes, make sure you clear "show null as", and define your link target as normal.
    Yes it is blank.
    Alternatively, you can construct the entire link within your SQL, using the NVL2
    Tried with NVL2 , decode case
    it works until ,i assign an image to it .
    i dont know where im doing wrong , since i used the same code as i did in apex 4.2 at apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=62710:1:
    login
    test/test
    thanks
    Edited by: Hunk09 on Oct 11, 2012 12:34 PM

  • Implement Java Classes to Report Builder

    Hi, I have problems implementing own java classes into the Report Builder. OK, let say I am running a simple report using STUDENT_ID and STUDENT_NAME. What I wanted to do is to concatenate a string "XXXX" to one of the records in STUDENT_NAME (e.g. STUDENT_NAME = 'Mary').
    The Java class that I wrote has a static method:
    public class MyAppend
    public static String myMethod(String s)
         s = s +"XXXX";
         return s;
    I also wrote a Formula Column in Report Builder called "TestFormula":
    function TestFormula return varChar2 is
         StuName     varchar2(40);
         myStr     varchar2(40);
    begin
    select STUMST.STU_NAME
    into StuName
    from STUMST
    where STUMST.STU_NAME= 'Mary';
    ->myStr := myappend.myMethod(myPackage.aobj, StuName);
    return myStr;
    end;
    The error message I get when I compile this Formula Column PL/SQL is (with '->' pointing to the line):
    Wrong number or types of arguments in call to 'MYMETHOD'
    How do I correct this error?
    Thank you.
    Joey

    Thanks Navneet. Actually I am new to PL/SQL programming. I have another problem here. I would like to list all the records of the STUDENT_NAME. How would I go about it using PL/SQL? This is the Formula Column I have written but it only shows me 1 record:
    function TestFormula return varChar2 is
    StuName     varchar2(40);
    cursor c1 is
    select all stumst.stu_name
    from stumst;
    begin
         LOOP
         open c1;
         fetch c1 into stuName;          
         stuName := myappend.myMethod(stuname);
         return stuName;
         EXIT WHEN c1%NOTFOUND;
    end loop;
    end;
    By the way, can you please give me any useful sites for reference to the PL/SQL?
    Thank you.
    Joey

  • Implement Java Class into Report Builder

    Hi, I have problems implementing own java classes into the Report Builder. OK, let say I am running a simple report using STUDENT_ID and STUDENT_NAME. What I wanted to do is to concatenate a string "XXXX" to one of the records in STUDENT_NAME (e.g. STUDENT_NAME = 'Mary').
    The Java class that I wrote has a static method:
    public class MyAppend
    public static String myMethod(String s)
         s = s +"XXXX";
         return s;
    I also wrote a Formula Column in Report Builder called "TestFormula":
    function TestFormula return varChar2 is
         StuName     varchar2(40);
         myStr     varchar2(40);
    begin
    select STUMST.STU_NAME
    into StuName
    from STUMST
    where STUMST.STU_NAME= 'Mary';
    ->myStr := myappend.myMethod(myPackage.aobj, StuName);
    return myStr;
    end;
    The error message I get when I compile this Formula Column PL/SQL is (with '->' pointing to the line):
    Wrong number or types of arguments in call to 'MYMETHOD'
    How do I correct this error?
    Thank you.
    Joey

    Thanks Navneet. Actually I am new to PL/SQL programming. I have another problem here. I would like to list all the records of the STUDENT_NAME. How would I go about it using PL/SQL? This is the Formula Column I have written but it only shows me 1 record:
    function TestFormula return varChar2 is
    StuName     varchar2(40);
    cursor c1 is
    select all stumst.stu_name
    from stumst;
    begin
         LOOP
         open c1;
         fetch c1 into stuName;          
         stuName := myappend.myMethod(stuname);
         return stuName;
         EXIT WHEN c1%NOTFOUND;
    end loop;
    end;
    By the way, can you please give me any useful sites for reference to the PL/SQL?
    Thank you.
    Joey

  • Spacer column  in Report

    Hi Experts,
    Could pls help me to create spacer column(Empty Column) in Report.
    Thanks&Regards,
    Sankara Reddy.

    Dear Nsreddy,
    For include Spacer Column (Empty Column) in Report, you have a different way,
    One of then work with cell in BEx Query Designer within two structures, one in rows and the other in column. 
    The other hand in create a WoorkBook and embed two queries.
    I hope those suggestion can help you son highline to answer your question,
    Luis

  • Unable to open Property Inspector in Reports Builder

    Hi all,
    We are facing a strange problem
    We have a big report with lot of functionality
    When I open the file in reports builder and try to open the property inspector of a Formula Column, the reports builder is getting hanged for a few seconds and then getting closed automatically.
    The same rdf was working fine till date. There is no change in the rdf.
    At the same time the report is working fine. We are not facing any problem in getting the report.
    What could be the problem?
    We badly need your help
    Thanks,
    Krrish

    Maybe some memory issues. Remove or disable some services temporarily or try to open this report on computer which has more ram.

  • Formula Column in Report 9i Builder

    Hi,
    I use this configuration
    Report Builder 9.2.0.1.0
    Windows XP Service Pack 1
    NLS_LANG "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"
    When I try to create a formula column that returns number, I have to choose datatype 'Nu'mero' (with accented u)as this is the only avaiable in the combo box. However when I write this PL/SQL code for the column:
    function CF_17Formula return Number is
    begin
    RETURN(1);
    end;
    Reports gives me the message:
    REP-0737: Deve ser uma funcao com retorno do tipo 'nu'mero'.
    In English this message could be
    REP-0737: Should be a function with return type 'nu'mero'.
    I don't have this problem with Character or Date formula columns (these datatypes are called Caracter and Data in Portuguese).
    It seems that Reports is having problems with u' (accented u) character. If I change NLS_LANG to AMERICAN_AMERICA.WE8ISO8859P1 everything works fine because I can choose Number in the Formula Column Datatype in the Property Inspector.
    The problem is in the function declaration not in the Return statement.
    Could anyone help me? Tks.
    Edmar

    Edmar,
    You are right. I could reproduce this issue.
    I have filed a bug to fix it from the development in next patch
    Thanks
    The Oracle Reports Team

  • Concate column into char in report builder

    Helllo!
    I am working on a report in report builder 6.0.8.27.0 connected to a 10g database.
    In my report i summarize a workers pick performance over a specified period of time on each new row (things like picks, active pick time). Most of the data is summarized using the in-built sum-function in report builder. But i have also a column in my table where i want to concate/aggregate the work zones(physical locations) that a worker has been in over a day.
    A simplified example of how my input query table can look like:
    user | picks | inlogged_time | work_zone
    mav | 100 | 10 | AREA1
    mav | 200 | 30 | AREA2
    ant | 100 | 10 | AREA3
    max | 100 | 10 | AREA3
    This should generate a report that has this structure:
    user | picks | inlogged_time | work_zone
    mav | 300 | 30 | AREA1, AREA2
    ant | 100 | 10 | AREA3
    max | 100 | 10 | AREA3
    My problem is i dont know how to concate the work_zones togheter. I tried using the PL/SQL editor for a function (using vm_concate()), but i could not get it to work and i can't use a new Select statement in my PL/SQL editor because the tables are to large for doing a new query on each row.
    Grateful for any help!
    Regards,
    Martin
    Edited by: 1009483 on 2013-jun-03 08:13

    Hi,
    A small modification to the above query ....
    with data as ( select 'mav' username, 100 picks, 10 inlogged_time, 'AREA1' work_zone from dual union all
    select 'mav' username, 200 picks, 30 inlogged_time,'AREA2' work_zone from dual union all
    select 'ant' username, 100 picks, 10 inlogged_time, 'AREA3' work_zone from dual union all
    select 'max' username, 100 picks, 10 inlogged_time, 'AREA3' work_zone from dual  )
    select username, sum(picks) picks , sum(inlogged_time) inlogged_time , wm_concat(work_zone) work_zone
    from  data
    group by usernameOutput:
    USERNAME,PICKS,INLOGGED_TIME,WORK_ZONE
    'max','100','10','AREA3'
    'mav','300','40','AREA1,AREA2'
    'ant','100','10','AREA3'Regards,
    Archana

  • Report Builder chrashes when creating a new formula column

    Dear all,
    whenever I try to create a new formula column in the data model, that is placed outside of a query, my report builder crashes completely. The same happens on my colleagues notebook.
    If anyone has an idea why this could happen, please let me know. I am currently using Version 9.0.4.1.0.
    Thanks and br
    Daniel

    You can keep the report builder you have now. Just install the new one in new oracle home. You can download it from here
    http://www.oracle.com/technology/software/products/ids/htdocs/904winsoft.html
    This download has Developer Suite 10g (Report 9.0.4.0.33, Form 9.0.4.0.19, JDeveloper, Discoverer, Designer)
    I don't think so you can select which product you want to install, like it was in 6i. So it will install everything.
    Try to install this version. Hope this will help.
    Thanks
    FS

  • Dynamically selecting column names in report builder ???

    Dear members,
    I have a requirement in which the user dynamically selects the tables column names. Like suppose take DEPT table. My query would be
    select &P Report from dept;
    so if the user selects DNAME then i would get the dname values and so on... This is fine but if one gives the value for the lexical parameter as DEPTNO,DNAME then i should get two columns in my report output. The select statement then becomes
    select DEPTNO,DNAME Report from dept;
    But i am not able to do this in report builder(6i). If i use just one value for the parameter then i get the o/p but if i use more than one (eg: DEPTNO,DNAME) then its giving an error.when i run this query through toad or sql plus then i am getting the desired o/p but wher as in report builder i am not able to get the o/p.
    My report triggers are :
    Before Parameter form :
    :P := NULL;
    After parameter Form :
    function AfterPForm return boolean is
    begin
    IF :P = 'DNAME,DEPTNO' THEN
    :P := ' DNAME,DEPTNO ' ;
    ELSE
         :P := NULL;
         END IF;
    return (TRUE);
    end;
    Your comments and suggestions are welcomed.
    thanks
    regards
    sandeep

    Number of columns can not be changed at run time. If your data model has three columns, lexical parameter should pass 3 values. If you have query like this in data model:
    select &p_1 from table
    Whatevere you have as initial value in user parameter p_1, data model captures that info.

  • SQL Server Report Builder Hyperlink Column Not Click-able?

    I have a report with a hyperlink column that works in SQL Report Builder 3.0 desktop, but not on the website where it's shown.
    1. 'Website_Domain' field is the shortened URL (domain) is the
    text seen in the Report column
         (technet.microsoft.com)
    2. 'Website_Url' field is the full length URL which is used in the
    'Go to URL' properties
         (http://technet.microsoft.com/en-us/library/ms159106.aspx)
    ['Website Link' Expression]
    =Fields!Website_Domain.Value
    ['Website Link' Column Properties]
    Action = Go to URL
    Selected URL: [Website_Url]

    Hi pointeman,
    I have tried your scenario on my test environment, but the issue was not reproduced. Please take the following steps as a reference:
    Insert Website_Domain field in the detail row, then type the table header with “Website Link”.
    Right-click the cell which contains [Website_Domain] to open Text Box Properties dialog box.
    Click “Action” in the left pane, select “Go to URL” option with [Website_Url] as “Select URL”. 
    The following screenshot is for your reference:
    If the issue still persists, could you please supply more information about the issue? Such as steps you have taken to add the URL or other else. If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Multi Row Madness: Insert?

    Hey Guys, I've been hitting my head against a cobbled wall trying to figure this one out. I'm creating a form that needs to support versioning - so instead of ever using an update the form always inserts a copy of the data into the database with an i

  • Problem Editing/Deleting the Photos uploaded via iTunes

    I uploaded some photos via iTunes to my iPad as well as my iPhone. I wanted to take advantage of the photo edito, the devices will not allow me to edit the original photo uploaded photo file. It is asking I do "Duplicate and edit" which will leave me

  • Help with #2170 error: tried suggested solutions, still not working

    Hi, I have a xcelsius movie which calls a web service that is located (in the same directory) on the same server as the movie.  The web service makes a call to a remote database.  I have tried following the suggested solutions of changing the flash s

  • How do I cut a movie into numerous smaller videos?

    I have a DVD/movie in iTunes that is simply a bunch of music videos. I want to divide this one DVD/movie into the 10 separate music videos it actually is. Can someone help me with this? I couldn't find any existing topics on it. Thanks!

  • IPad first generation

    I have  an iPad first generation, any suggestions on a product that let's me listen to the music through my automobile speakers?