Need to determine if an Expression field is empty in CR 2011

I have an expression field in a subreport. This field collects a list of computer models to which a given hard drive is assigned. I need the field to always have a border around it even if there is no data. But I have been told by someone on this forum that no border will be generated if the field is empty.
That being the case, I need to find a way to show a blank, bordered field the same size as the subreport window in the event that the subreport has no data. I need to know if it needs to be done in the subreport itself or in the parent report.
Can someone please help me out on this? I've run out of ideas.
Thanks!

Hi,
Yes, that is true. The field borders are not drawn when there is no data for that field.
Here's a workaround though. Create this formula and use this formula field instead of the original database field on the report
if isnull({database_field}) or not({database_field} > 0) or not({database_field} = "") then
space(1) else totext({database_field})
You can then apply borders on this field and you'll see that the field draws the border when there is no value.
If the field that is in the Subreport, then it needs to be done in the Subreport, otherwise in the Main Report.
-Abhilash

Similar Messages

  • SQL Expression Field Help

    Need to create a SQL Expression Field based on this query - or can someone tell me how to do it CR syntax?
    SELECT Count("ordhdr"."ACCT_NO")
    FROM ordhdr
    WHERE (dt_in between '2011-01-01 and '2011-10-31')

    create a group, group off of account number.
    Your select statement should be close to this.
    in Date (2011, 01, 01) to Date (2011, 10, 31)
    You can drop your fields into the detail section.
    Right click the ordhrd select insert summary, group 1, and change it from sum to count.
    You can suppress the details.
    The corresponding SQL would look something like this.
    SELECT `ordhdr`, `acct_no`, `DT`
    FROM   `Datasource name`
    WHERE  (`DT`>=#2011-01-01 00:00:00# AND DT`<#2011-10-31 00:00:01#)
    ORDER BY `acct_no`

  • I need to determine the fields on a selscreen at runtime

    Hi Team ABAP,
    I need to determine the fields on a selscreen at runtime.
    That means FM´s like DYNPRO_FIELD_GET, are not doing the i need.
    If a field is made inactive or invisible in PBO (at selection Screen Output) i dont Need/want this in my Analysis.
    Maybe i better state what i want to achieve.
    I want to rightclick a selscreen-field, and then use the upcoming context menue to make it dissappear.
    For that i added a pf-status to that selscreen.
    In sy-curow i get which row the user clicked on (for example take 5), so now i need to find out which selscreen field is displayed in row 5.
    So i can create the customizing entry for this field.
    Maybe someone has an idea for me, i dont need coding, i can do that myself.
    Thanks for reading
    regards
    Florian Kemmer

    Well Anyway, it took me a Little but i figured it out.
    following code does the trick for me:
    [code]
    Tables phelp.
    IMPORT phelp FROM MEMORY ID 'PHELP'. [/code]
    i do this in the Event AT_SELECTION_SCREEN OUTPUT.
    Then in phelp-dynprofld i have the actual field i clicked on.
    And even if i totally misunderstood you you helped me a lot focusing my thoughts on the right way.
    Before your answer i didnt think about that while pressing F1 it works and i only have to find out how they do it.

  • SQL Expression Fields button not visible in Field Explorer

    Hi,
    On my Crystal Reports installation I can see the button SQL Expression Fields in Field Explorer but it is not visible on client's installation.
    How do I make it visible? I need to create a new report with SQL query for client.
    Thanks,
    Ajay Audich

    Commands are intended to replace the standard linked tables that must users are accustomed to.
    I suppose Commands would be considered an "advanced" feature, considering that they require the developer to be able to hand write SQL (our at least copy it from another SQL editor).
    If you are comfortable writing reading, writing & editing SQL, Commands will open a the door to a whole new level of control when it comes to creating your data sets.
    The biggest problem w Commands is also it's greatest strength... If you're using a Command, CR will assume that you know what you're doing and will not try to rewrite or optimize your SQL in the background. You write it, CR sends it. That means if you write crappy SQL, CR will send your crappy SQL to the db server...
    It also means that you can use join types that aren't available in CR and use sub-queries in in your SQL... Basically anything you can do in the db's native editor.
    HTH,
    Jason

  • Passing a variable to an SQL Expression Field

    Is it possible to pass a value or variable to an SQL Epression field?  I want to sum the values of open invoices for a particulat customer and want to do this using an SQL Expression Field.  I need this sum in a  subreport and since I can not put a subreport in a subreport I want to do it using an SQL Expression.
    Thanks.
    Ralph

    That would require a SELECT statement in the expression and they really are not designed to do that.
    If you can't do this client side write a stored procedure then you have full control and CR is just used to display the data.

  • Select Expert or SQL Expression Fields help

    I am trying to do something I would consider very simple but can figure it out.
    I have two tables.  FDC_Trips & Facility.  On the report I can get the FDC_Trips.DivertedbyFacility field to populate a number value because that field is an integer.  But we need the name to show up.  That field is the ID (foreign key) of a Facilty which matches with the field Facility.Code.  Instead of it displaying the DivertedbyFacility number/ID I would like it to be able to show the Facility.Name value.  If I place the filed Facility.Name field on my report it is blank. 
    How can I write a where clause to query the Name of the Facility where the Facility.Code = FDC_Trips.DivertedbyFacility?
    Do I use the Select Expert or SQL Expression Fields.
    Please advise.

    Actually you'll use the Links tab in the Database Expert. If CR did it's stupid auto linking thing... delete them. It usually get's it wrong.
    Now just link the fk field in FDC_Trips to the pk field in Facility. Once you have that done you'll be able to simply drop Facility.FacilityName directly onto the report.
    HTH,
    Jason

  • SQL expression field is not displayed on the page header if no records

    Hello
    I'm creating a quite simple report. In this report I've got a SQL expression field which returns a DateTime
    I display this field on the page header section.
    Everything is working fine except when my principal query doesn't return any records my SQL expression field is not displayed. It doesn't seem to be evaluated.
    So, I would display this field even if my Details Section doesn't contains any record.
    I hope you understand what I mean.
    Can someone help me?
    thanks

    Hello,
    I thought about creating a formula but the value I need is stored in a database.
    So i created a simple SQL expression field.
    SELECT CONVERT(DATE,j_1) FROM VW_STD_DATEFIXING
    And this expression doesn't have any dependencies.

  • Sql expression fields - odbc drivers

    We are using Crystal 2008 with SAP ECC 6.0, and the database is sql server 2005. We had Integration kit installed. We have developed few reports with this one from ECC 6.0.
    My problem is, I am not able to see the SQL EXPRESSION FIELDS in the FIELD EXPLORER of CR 2008. From the replies for my
    previous postings in other forums here and from the feed back of Don Williams, I understood there is a problem with odbc drivers.
    I checked trying with new report and tried using ODBC(RDO) but found no drivers. The ODBC data source window showing "dBASE Files, Excel Files & MS Access Database" in the data source Names field.
    Even from my machine, I checked the ODBC drivers and found only the above three were present in the user DSN tab of ODBC data source administrator window. Shall I have to add ODBC drivers for SQL Native client OR SQL server OR both (FROM THE DRIVERS TAB)?
    Will there be any other ODBC is required for SAP INTEGRATION?
    What are the steps to resolve this and to activate and use the drivers? so that I can see SQL Expression fields & also "Show sql query".
    BABASHARI

    Hi,
    So by establishing the connectivity through the proper transports and authorizations done to CRM, can I build
    single report by getting the data from two tables one from ECC and another from CRM?
    >> which then means for SSO you need to configure 2 SAP systems on the BusinessObjects Server
    And one more question, If I could not succeed in getting the connectivity through the proper transport & authorization to
    CRM, (lack of basis resources) then can I use BAPI / RFC'S to pull the data from CRM into ECC and then into CRYSTAL(as, ECC is working fine with crystal through the integration kit)? Is it a good practice? Thanks in advance.
    >> for CR then the ECC system would become the single point of entry. sure - that would work as well - but shoulnd't be necessary
    Ingo

  • SQL Expression field with parameter

    Hello,
    I am trying to create a SQL Expression Field that will give me the maximum status date of an employee before a certain date entered in parameter.
    ex: select max(status_date) from status where status_date < formula field or parameter
    Since I can not put a paramter or a formula field in a SQL Expression field, I might need a template or an example of something that works ?
    Thank's
    Steph
    Edited by: Stephanie Charest on Aug 4, 2008 7:59 PM

    Ok,
    The only way I found to get the maximum status date of an employee with the date entered in parameter was to litteraly put each employee ID, and Status Date in the Detail section.
    Then in the select expert create the parameter date.
    Then I created a running total field that counts the employees and resets on change of employee sorted by status date.
    Then I created a formula that gets all the first occurences of this running total field and if the running total field equals 1, a new formula field shows 1 and if not (2 and more), it shows 0.
    But I can't find the way to give me the total that I need for each group sections.
    It's ok if the SQL expression field does not work, but I need to find a way to get the max date.
    Thank's for your help for the SQL Expression field.
    Steph

  • SQL Command/SQL Expression Fields

    CR XI R2
    Hi All,
    Here's the situation.
    There is an SQL table of lookup codes.  The columns in the table are "FIELD", "VALUE", and "DESCR".
    The data looks like
    CRA_TYPE      RV     Receiving
    CRA_TYPE      AJ      Adjustment
    CUST_TYPE    MD     Medical
    CUST_TYPE    RT      Retail
    The main datatables contain a "VALUE" in a particluar "FIELD" and I need to be able to retrieve the appropriate "DESCR" to output on the report.
    There is a stored procedure that takes 'FIELD" and "VALUE" and selects "DESCR" but I can't figure out how to set it up as a formula field and pass parameters to it for each line.
    It is basically
    SELECT DESCR FROM tbLookUp WERE [FIELD]=@FIELD AND [VALUE]=@VALUE
    The "FIELD" parameter would be static (in this case "CRA_TYPE") and the "VALUE" parameter would be the value of the CRA_TYPE field in each datarow.
    I can't just use the "VALUE" since more than one field might have the same "VALUE" but a different "DESC".  Only the combination of "FIELD" and "VALUE" is unique.
    I've been playing with SQL Commands and SQL Expression Fields with no success.  There aren't a lot of samples to look at especially the SQL Expression Fields.
    I could create a new stored procedure that would just send in the translation but I don't want to create a stored procedure for every report and almost all the reports will need a similiar transaction scenario.
    Any help would be greatly appreciated.  
    Thanks in advance.
    Larry

    Yes, I am pretty familiar with Crystal, at least in the routine stuff and pretty good in VB and SQL.
    In normal SQL I would retrieve it with a join to the LookupTable.
    like: JOIN tbLookUp ON tbLookUp.FIELD = 'CRA_TYPE' AND ( tbLookUp.[value] = tbCRA.CRA_TYPE)
    and then just add to the SELECT statement:   tbLookUp.DESCR
    However, I can't find anyway to use the Database Expert to add the FIELD='CRA_TYPE" to the linking process
    I was hoping the "SQL Expression Fields" might hold the answer but the documentation and examples on their use is pretty slim.
    I was hoping for a way to run something like:  SELECT DESCR FROM tbLookUp WHERE FIELD = 'CRA_TYPE' AND [value] = {tbCR_AUDIT.CRA_TYPE} which would evaluatefor each record like a Formula Field which I could then just insert into the report.
    Everything I've tried in the formula editor for an SQL Expression is no good, but run just fine in the SQL Server Management Studio.
    I could just skip the "Database Expert" completly and write an SQL Expression as a "SQL Command" that would retrieve it but I'm trying to use the "Database Expert" for ease of maintenance by other people later on and keep as much as I can in CR.
    Maybe I'm asking CR for too much.
    Thanks

  • Call to PL/SQL Stored Procedure in the HTML expression field

    Hi,
    I need to display an image in a report based on the value of the underlying field. (Y/N)
    I created a solution based on http://www.dba-oracle.com/t_easy_html_db_display_image_html_expression.htm
    Unfortunately this does not work for me. The PL/SQL written in the HTML expression field is not being executed. The result is something like : <img src="PKG_IMAGES.display_YN_checkmark_image?p_image=Y">
    What am I missing?
    Tx for your help.

    kcaluwae wrote:
    Hi,
    I need to display an image in a report based on the value of the underlying field. (Y/N)
    I created a solution based on http://www.dba-oracle.com/t_easy_html_db_display_image_html_expression.htm
    Unfortunately this does not work for me. The PL/SQL written in the HTML expression field is not being executed. The result is something like : <img src="PKG_IMAGES.display_YN_checkmark_image?p_image=Y">
    What am I missing?Ensure that the Display As Column Attribute for the report column is Standard Report Column.
    However, the linked article appears to be very out of date. If using APEX 3.1 or later, see About BLOB Support in Forms and Reports for a better alternative.
    There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well. (That might be an earlier version but it is still relevant to APEX 4.x.)

  • Sql expressions field disappears

    I updated to CR XI Release 2 and the sql expressions field disappeared. It is there only in subreports. What is wrong?
    Thanks in advance

    Hi Kiril
    Let me know if you are using any stored procedure in the main report or not?
    If you are using any stored procedure or command object in the report then the SQL expresions is not available in Crystal Reports.
    There is an SAP note on SAP Developer network addressing this issue.
    You first need to logon to https://www.sdn.sap.com
    and search for:
    1217791 - 'SQL Expression Fields' are unavailable in the CR Field Explorer
    let me know if it helps or not.
    Regards
    Nikhil

  • Need to determine which partner function level is pulling in the currency (

    need to determine which partner function level is pulling in the currency (sold to, ship to , bill to or payer)on sales invoices
    Also I my requirement is to have different currency based on different ship to party for same sold to..then how set up the same

    Hi,
    Yes, that is true. The field borders are not drawn when there is no data for that field.
    Here's a workaround though. Create this formula and use this formula field instead of the original database field on the report
    if isnull({database_field}) or not({database_field} > 0) or not({database_field} = "") then
    space(1) else totext({database_field})
    You can then apply borders on this field and you'll see that the field draws the border when there is no value.
    If the field that is in the Subreport, then it needs to be done in the Subreport, otherwise in the Main Report.
    -Abhilash

  • Need to determine data type of free characteristic in multiprovider

    Hi,
    I need to determine the data type (e.g. numeric vs alpha numberic) of a free characteristic in a multiprovider.  Can this be accomplished in BEx Query Designer? 
    If not, can it be accomplished in RSA1?  How?
    Thanks,
    Kevin

    its not possible via Query designer..
    give that object name if it is infoobject then you can get via RSD1

  • NOT ABLE TO SEE SQL EXPRESSION FIELDS IN CR2008

    Hi,
    I am not able to see the SQL EXPRESSION FIELDS in the FIELD EXPLORER of CR 2008.Can
    you please help me
    BABASHARI

    Hi,
    I would suggest you open the question in the Crystal Reports forum.
    Ingo

Maybe you are looking for

  • Formatting using Disk Utility

    i have a USB drive of 8 GB (pendrive) currently formatted in FAT-32, i would like to know (a) How to format it into MAC OS JOURNALED ? (b) Will formatting it into MAC OS Journaled make it non-readable on WINDOWS PLATFORM? (c) And after formatting in

  • PO creation where discount is given after taxes for few Vendors

    Hi pankaj, Need a pricing stucture in PO creation where discount is given after taxes for few Vendors. please give the solution with brief steps. Regards, Pandi

  • Keyboard won't turn on since 10.6.8 update

    Hi, I downloaded the 10.6.8 update yesterday went to bed, got up this morning, went into my iMac woke it with a press off my mouse, but the keyboard was typing! So changed the batteries now the keyboards not turning back on. Anyone else having this i

  • Uninstall DS 3.0 also uninstalls BOE XI 3.0 MYSQL.

    Hi All, I had an issue where the DS 3.0 repo was pointing to the default BOE XI 3.0 MYSQL installation. The issue was when I updagred DS 3.0 to DS 3.1 I went to uninstall DS 3.0, the uninstallation processes also went and removed MYSQL that was insta

  • Problem using extract function (PL/SQL) with "&#34"

    Hi, When I use extract function (PL/SQL), it does not transform well "&#34". Insted of returning ' " ' , it returns ' &quot '. I know this works changing the code replacing xml.extract for SELECT extractvalue(xml,'//A/text()') into v from dual; But I