Report formatting/sorting issue

Hi,
Here is something I spent a whole day on, and still can't figure out.
I have a simple SQL report, which is supposed to show estimated and actual expenses and the variance between the two. The trick is that whenever the variance is positive, the numbers should be green and whenever it is negative - the numbers should be red and NO MINUS SIGN should be shown. For example, if the variance is "-15", then a red "15" should be shown.
The report query is as follows:
SELECT
region,
estimate,
actual,
(estimate - actual) AS variance,
(CASE
WHEN (estimate - actual)>=0 THEN 'green'
WHEN (estimate - actual)<0 THEN 'red'
ELSE NULL
END) AS variance_color
FROM
expenses
And then the following HTML expression is used for the Column Formatting on "variance" field (sorry for double "<<" and extra spaces - I could not figure out how to format text for this posting):
<< span style = " color : #VARIANCE_COLOR# ; font-weight : bold ; ">#VARIANCE#<< / span>
All works quite well and I get the colors right, but I still have the minus sign on the negative numbers. If I use "ABS(estimate - actual) AS variance" in my query, I certainly can get rid of it, but then sorting does not work properly, since negative numbers are treated as positive.
Any ideas would be appreciated.
Constantine

Hello Constantine,
>> If I use "ABS(estimate - actual) AS variance" in my query, I certainly can get rid of it, but then sorting does not work properly, since negative numbers are treated as positive
Please try the following:
SELECT
region,
estimate,
actual,
'<input type="hidden" value="'||(estimate-actual)||'">'||
abs(estimate - actual) AS variance,
(CASE
WHEN (estimate - actual)>=0 THEN 'green'
WHEN (estimate - actual)<0 THEN 'red'
ELSE NULL
END) AS variance_color
FROM expensesThe trick is to add to the column a hidden prefix with the real value of the column, and then concatenate it with the visible value. As the sort order is determine by the beginning of the column – the hidden prefix in our case – you can enjoy both worlds – maintain a correct sorting order while displaying only positive colored numbers.
>> sorry for double "<<" and extra spaces - I could not figure out how to format text for this posting)
You should use the forum tags *&#91;code]* and *&#91;/code]* .
Regards,
Arie.
&diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
&diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • XI R2 To 3.1 Sp2 migration and report format issues

    Hello,
    is there a way to fix or troubleshoot report format issues after migrating to 3.1?
    We have a heavy report that the format (the way the report looks) is very important. In crytal Reports 2008 sp2 the format is OK.
    But from BOE CMC or from url reporting the report format have problems.
    Thank you
    Edited by: RUHVER BARENGI on May 18, 2010 9:47 AM
    Edited by: RUHVER BARENGI on May 18, 2010 9:48 AM

    Hi Ruhver,
    Crystal Report documents are heavily dependant on the printer driver for formatting.  If you design the report using a specific default driver than it will be dependant on that printer driver for formatting.  When you publish it to Enterprise, the same printer driver may not exist so the report will be re-formated to fit the default driver on the server, or if no driver exists, it will use an internal method to format the report. 
    Try this as a test.
    1) Open your report in the CR 2008 designer.
    2) Click on the File/Page Setup. 
    3) Select the "No Printer" option.  This tells the report to use this internal method to format the report
    4) Save this document as "Title - No Printer"
    5) Export it to Enterprise
    6) Test this report again.  Formatting should be identical in BOE vs CR.
    Keep in mind that when you change the driver in step 3, the report in the designer will re-format.  You may need to tweak the report again in order for the formatting to be as desired.
    Test this out and if you require further assistance with this, I would suggest opening a message.  This is a common issue and a support engineer could likely help you with this pretty easily.
    Hope this helps,
    Jb

  • Reporting format Issue .. Result  row Count Display...URGENT!!!!

    Hello All,
    Need solution for my issue in reporting,
    This is my Report format
    Date              A/c number   Kf1   Kf2 Kf3
    01.06.07            123         10    20   0
                       234          20    30   30
                       456          50    0  25
                       789           0   25   0
                       Result       80   75  55  
    01.07.07            124         10    0  10
                        134         30   30  30
                        457         40    0   0
                        788         0   25  10
                       Result       80   55  50
    Now my requirement is to display Count in the result row as
    Date             A/c number    Kf1  Kf2 Kf3
    01.06.07        123            10   20   0
                    234            20   30  30
                    456            50    0  25
                    789             0   25   0
                    Result          3    3   2  
    01.07.07        124            10    0  10
                    134            30   30  30
                    457            40    0   0
                    788             0   25  10
                   Result           3    2   3
    and to be more precise this is my requirement
    Date        Kf1  Kf2 Kf3
    01.06.07     3    3   2
    01.07.07     3    2   3    
    I made key figure Calculate Result as Count <> 0 and Calculate single value as Supress Result for each key Figure and A/c Number No display I got result like this showing all data as blank, however the rows will exist.
    Date          Kf1  Kf2 Kf3
    01.06.07                                                                               
    3    3   2  
    01.07.07                                                                               
    3    2   3
    But I need my result should be like this
    Date        Kf1  Kf2 Kf3
    01.06.07     3    3   2
    01.07.07     3    2   3   
    How can I Acheive this either by work Book Or  by Query ,
    Please help me
    Thanks for all ur support in advance
    Sai.

    Hello Boujema,
    I Created formula variable replacement path  in the same way you mentioned but this is irrespective to KF giving the Characteristic Account Number count...
    Hello All,
    please go through my requirement
    this is my report
    Date        AC no  Kf1 Kf2
    01.06.07     XXX   10  12
                 yyy   15  10
                 zzz    5   0
               result  30  22
    If I remove Ac no from this it gives me a result as summation
    Date        Kf1 Kf2
    01.06.07    30  22
    In the same way the KF should give me count of the accounts
    Date        Kf1 Kf2
    01.06.07    3    2
    But I am getting now as If I mention Count<> 0 in KF properties
    Date        Kf1 Kf2
    01.06.07     1    1
    If I place Account Number in report which I dont want to Then i will get count
    Date        AC no  Kf1 Kf2
    01.06.07     XXX   10  12
                 yyy   15  10
                 zzz    5   0
                Result  3   2
    Hope you understand my requirement and come up with any solution.
    Thanks for your help,
    Sai.

  • Issue on How to mimic Deski document from CMS to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Would you know if there's a way to mimic Deski
    document from BOXI server(CMS) to local machine, pass parameter, execute and
    save in a mutiple report format then store in a local drive or network
    drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence.  Please let me know your ideas. I would really appreciate your help. Thanks.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Hi Ted,
    Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below. 
                Error Message:
                A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.    

  • Where to find Crystal Report Formats for SAP B1 8.8 (India Localization) ?

    Hi Experts,
    do anybody knows Where to find Crystal Report Formats for SAP B1 8.8 (India Localization) ?
    For example
    Sales Register
    Purchase Register
    Journal Register
    Sales Analysis - Crystal Report
    Purchase Analysis - Crystal Report
    Check Register - Crystal Report
    Production register
    Pending Sales Order
    Outstanding Receivable
    Outstanding Payable
    BankBook
    CashBook
    General Ledger
    BP Ledger (Customer / Supplier)
    Trial Balance
    Balance Sheet
    Profit & Loss Statment
    Cash Flow statment
    Excise reports
       RG 23 A Part I
       RG 23 A Part II
       RG 23 C Part I
       RG 23 C Part II
       Daily Stock Account
       RG 1
       ER 1
       etc....
    Documets Layout
       Incoming Payment
       Outgoing Payment
       Journal Entry
       Transaction Journal Report - Crystal Report
       Sales Quotation
       Sales Order
       Sales Delivery
       Sales Return
       Sales Invoice (A/R Invoice)
       Purchase Order
       Goods Receipt PO
       Purchase Goods Return
       Purchase Invoice (A/P Invoice)
      Inventory Transfer
      Inventory - Goods Receipt
      Inventory - Goods Issue
    Best Regards,
    Samir Gandhi

    Hi Neetu,
    Do you wish that at all customer site all concern involved in implemtation do the same work ?
    I believe ERP is meant for single entry system, and it should be true for implementation also, why to invest man hours for the same task ?
    I expect it standard reports should be released by SAP, so that speed of implementation improve, we have more nos. of satisfied customers.
    customised reports is all together different and it is understood that it is needed to be developed after study the exact requirement.
    Best Regards,
    Samir Gandhi

  • How should I report forum performance issues?

    The forums rely heavily on the caching features of browsers to improve the speed of page rendering. Performance of these forums should greatly improve after a few pages because more and more of the images, css and javascript is cached in the browser. As a consequence, when reporting forums performance issues the report should include some information on the state of the browser cache to determine whether the issue is a browser issue or a server issue. Such detailed information is generally not available from just watching the browser screen, but needs to come from specialized tools such as performance monitor plugins and recording proxies.
    The preferred report method for performance issues is to use the speed reporting features build into or available as a plugin for a browser for both the page you want to report a problem with and several refence pages in the site. Detailed instructions are listed below separated out for different browsers. If possible, please use Firefox for submitting the report because it provides an export format that can be read back electronically.
    Known performance issues
    The performance issues with any screen with a Rich Text Editor, such as the Reply window and the compose Private Message window have been acknowleged and improvements are being implemented.
    Mozilla Firefox (preferred)
    Warning: it is currently not recommended to generate a speed report when logged in. The speed report has enough detail for somebody else to hijack your session and impersonate you on the forums. If you really must report while logged in, make sure you log out your browser after generating the speed report and wait at least 4 hours before posting.
    Install the Firebug plugin
    Install the NetExport 0.6 extension for Firebug
    Enable all Firebug panels
    Switch to the "Net" panel in Firebug
    Click on this link
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Browse to the page where you are experiencing the performance problem.
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Click on this link
    Export the data from the Firebug Net panel
    Browse to the page where you are experiencing the performance problem.
    Export the data from the Firebug Net panel
    When you report a performance problem please attach the 6 exports from the Firebug Net panel and an explanation of how you are experiencing the issues (for instance how much slower it is then normal) and include a description of your internet connection (dial-up, dsl, cable etc.) and the country from where you are connecting. If you have non-standard tweaks to your Firefox configuration (such as pipelining enabled) or are running any plugins please include that information in your report as well.
    Google Chrome
    Open the Developer Tools (Ctrl-Shift-J)
    Navigate to the resources tab
    Enable resource tracking.
    Click on this link
    Export the resource loading data.
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Navigate to the page where you experience the performance problem
    Export the data
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Click on this link
    Export the data
    Reset the data by disabling and enabling resource tracking
    Navigate to the page where you experience the performance problem
    Export the data
    Since Google Chrome does not have an export format for the Resource Tracking information best current practice is to take a screenshot and note the hover details for any resource with a tail that is longer then 25% of the total load time. When you report a performance problem please attach the screenshots and an explanation of how you are experiencing the issues (for instance how much slower it is then normal)  and include a description of your internet connection (dial-up, dsl, cable etc.) and the country from where you are connecting.
    Apple Safari
    The Apple Safari Web Inspector has a Resources panel similar to the Resources panel in the Google Chrome developer tools.To get there, follow these steps:
    Show the menu bar.
    Go to preferences
    Go to the Advanced Tab
    Check “Show  Develop menu in menu bar”.
    From the Develop menu select “Show Web  Inspector”. 
    Collecting the performance information and exporting works exactly the same as in Google Chrome. Please refer to the instructions for Google Chrome.
    Microsoft Internet Explorer
    IE does not have native features to analyze web traffic. No plugins have been found that produce the required information (please let us know if we missed any). For now, please reproduce the issue with Firefox, Chrome or Safari.
    Please note that due to the reliance on Javascript for the interactive effects the performance of these forums will be much better on MS IE 8 then on previous versions of MS IE.

    Hi
    It works, check once again...
    regards
    Swami

  • 3.0 Shared Component - Report Format - all PDF

    Greetings,
    Details
    I have been working with the REPORTS - REPORT QUERIES section of APEX 3.0
    The testing I have been doing is very simple, but I am running into a bit of a stumper.
    I have created 4 report queries on the EMP table (SELECT * FROM EMP) that all use the same REPORT LAYOUT. The RTF file which is the template is a very simple - show all columns and rows for the EMP table (14 rows).
    I have set each of the 4 report layouts to a different format.
    1 - PDF
    1 - EXCEL
    1 - WORD
    1 - HTML
    I am NOT using the ITEM to dynamically set the format.
    I can TEST each of the reports in the shared component area, and they test OK with a success rate of 75%.
    The EXCEL format does not export correctly. (using Excel 2002 on the client) It is a bit of a mess. (Works in the XML publisher template builder on the client.. so the format is not the issue.)
    More curious is the behavior when I put this application. I have created a LIST of the 4 report formats. All 4 return the PDF format when used.
    To see the Application:
    http://apex.oracle.com/pls/otn/f?p=34096
    Question Summary:
    1 - Has anyone run with and tested the RTF style report layouts out to Excel?
    2 - The approach described usees 4 report queries against 1 layout. Is this a VALID use of the report functionality?
    3 - Why would all the reports try to use PDF when they test in the correct formats?
    Best Regards and Thank You.
    -- Tim

    Tim,
    The Excel output is not strictly XLS, it's actually HTML formatted in a way that Excel understands and through setting the MIME-types we make it open in Excel. I have to try reproducing your specific problem with Excel 2002. If you could send me your RTF layout and the end-result ([email protected]), I can take a look.
    Your approach using 4 different queries with the same layout is perfectly fine. Ideally of course, you would not have to replicate them same query four times, so we are considering a shared query concept for future version of Application Express.
    You specific problem with the output format being PDF at runtime appears to be a bug, I'll investigate further. Meanwhile one work-around would be to use a report region instead. If you're using the same SQL query as the source, you can associate the same report layout (on the report print attributes page). You could also create a "container" page for that report region, that's never actually called by the end user, and then have a button pointing to the URL below for printing. It would then work just like your report queries, only that you now would get the requested format:
    f?p=&APP_ID.:[REPORT PAGE ID]:&SESSION.:FLOW_XMLP_OUTPUT_R[REPORT REGION ID]
    so if your app ID is 34096 and your "container" page e.g. 99, and on page 99 your report region ID would be 1234567890, then use this URL as the button target:
    f?p=&APP_ID.:99:&SESSION.:FLOW_XMLP_OUTPUT_R1234567890
    Hope this helps,
    Marc

  • Change the HTML Report format the same as TestStand 2010 SP1 in TestStand 2012

    I have a lot of test steps (~10K)  that gets executed and the indentations on HTML report format in TestStand 2012 gets too deep.  I have to slide the horizontal bar to the right to see the report when l'm in the middle.  I did not have this issue in TestStand 2010 SP1.  
    Is ther a way to change the HTML Report format (style) the same as TestStand 2010 SP1 in TestStand 2012? 

    dexrays:
    We are currently investigating this issue. In order to help us with the investigation could you post a sequence file and configuration that reproduce the problem? The configuration file is located in C:\ProgramData\National Instruments\TestStand 2012\Cfg\ModelPlugins\ResultProcessing.cfg for Windows Vista / Windows 7 or you can use the Cfg link in the TestStand 2012 installation directory. 
    You can use the Legacy Model Switcher (included in TestStand 2012) to use the legacy models instead of the new models. The legacy models are more backward compatible, however, this also means that you will not be able to use the improvements in the new models (for example, the new plug-in architecture). If this is acceptable then you can use the legacy model switcher to switch to the legacy models. The Legacy Model Switcher is located in the Start Menu under Programs->National Instruments->TestStand 2012->Tools->Compatibility. For more information on Legacy Model Switcher please read the online help.
    Thanks for your report and for your help with diagnosing this issue. 
    - Francisco

  • Error: "Couldn't create Crystal Reports Engine for report format version 10.0"

    Post Author: mkubala
    CA Forum: Crystal Reports
    I created several reports in ClearQuest v2003.6.15 using Crystal Reports v10. When a user tries to run these reports from his machine he gets the following error:"Problems executing ReportContact your ClearQuest administrator to verify that a supported version of Crystal Reports has been installed.Couldn't create Crystal Reports Engine for report format version 10.0"My version of CR is compatible with this version of CQ and he shouldn't need CR installed to run the reports so I'm not sure what the issue is?

    Post Author: nschindler
    CA Forum: Crystal Reports
    I have the same problem with ClearQuest 7.0.1.1, except the error contains 'version 11.0' instead of 10.0.This happened when I installed Crystal Reports XI Pro designer.  I followed the procedure to manually uninstall and re-install CR, which allowed me to to author report formats, but I still get this error when trying to view report in the ClearQuest for Windows client.  I tried to re-register all the CR viewer DLLs I could find, but still no luck.Any suggestions?  Thanks,Nate

  • Formatting webI issue: page size such as othe normal US sizes are missing.

    In a WebI report formatting "//page layout > page size", the report page size issue of other normal US sizes are missing. Such as: 11x17 inches. Is there a way we can include these page sizes?

    I face a somewhat similar issue. We have existing reports in Reporting Services - that can present the complete data in one page PDF and similar page creation in webi is just not possible. With sections and data seperation the whole report comes in 3 or 4 pages and no recourse to manipulate page size.
    I hope BO provides more enhancements to Webi - once adhoc users start creating reports they expect to see formatting that's traditionally present in canned reports

  • ITunes album sorting issue

    Hi everyone. ( :
    I'm currently having a minor yet aggravating issue with iTunes, where—upon album import—it separates albums, or even singles. It's a bit hard to explain, so I've included an image capture of the problem:
    http://img16.imageshack.us/img16/6150/itunesissue.png
    I've checked the ID3 tags and pretty much everything, and iTunes still doesn't join the albums, and the fact that I can't figure out why iTunes does this is what's so annoying.
    It only happens when I click the arrow to show the artwork in the list view, but it doesn't happen to all my albums and singles, though, just the few, and so far, the only temporary workaround that seems to do the job is going through the ID3's (empty) sorting fields and typing a single space in each box, like so:
    http://img18.imageshack.us/img18/254/itunesissue2.png
    It'd be nice to be able to import my music without having to do all that, of course. And since I've never had this problem in any of the previous versions of iTunes, I wonder if my particular problem is a bug or something?
    Is anyone else having this problem as well? I've been lurking through the iTunes forum and haven't seen another report of this issue. I'm kind of at a loss as to what I should do about this.

    I have had one or two cases of album names appearing identical in every regard except a very slight difference in appearance of one of the characters which suggested it might be derived from a different font or something similar. In that case pasting the information from one file to the other overcame the issue.
    The other thing to check is if the artists are all absolutely identical too. Again, it is easy to accidentally introduce a space, or to use one kind of dash instead of another which may be almost indistinguishable to you but forces itunes to think the album is an album with the same name but by a different artist so it isn't really one album but two.

  • Payment Advice to Vendor Report Format

    Dear Sap Guys,
      This is the First time i am posting my queries i am currently in client place.
    I would like to get report format for Payment Advice to Vendor Report Format
    And
    Asset Accounting Documents with Depreciation configuration

    Dear Rupa,
    Please send me a test mail: [email protected]
    Will send the relevant asset accounting documents with Dep config.
    Regards,
    Sreeni.
    +919986032960.

  • Difference between pdf and html report format

    Why HTML report printouts truncate from the right-end side, compare to the pdf report format ?, do i need to change anything
    while running report through HTML format

    The printing from html output is majorly affected by browser settings. Once you try to change the left and right margins in page setup before printing, I solved this problem in this way , it may work for you. Let me know if it works or if you overcome it by other ways.
    with regards
    wara

  • Daily,weekly and monthly report format

    hi
       i  was asked to create a format for daily, weekly and monthly system performance report .. can anyone send me  sample report format..

    Hi Sandy,
    System Performance is always checked by a list of our lovely transactions in BASIS I generally had created one for my self and keep a track of performance..
    IT goes like this..
    Daily : DB12(Check Backup Logs);SM51(Check serv are UP);RZ20(Look for ALerts); SM13;SM21;SM37(check for cancelled jobs);SM12; st22 (dumps); ST02; SM35; SP01 (Spool jobs for more time); AL02; ST04; AL16.
    Weekly : DB12; DB02; SAPDBA checks ; DB drives and space;  EWA report of the past week.
    Monthly : More or less the same stuff of Weekly  with Archive files as well ...and SAPDBA cleanup logs... Monitor the DB growth and check for the backup logs...
    Hopefully this info shd help yoiu in this regard.
    Please award suitable points for the post.
    Br,
    Sri

  • The report format is:

    The report format is:
    <filename> <phase> <return code where appropriate>
    here what is phase and return code where appropriate?
    thanks
    with regards

    If you are talking about using the Report Generation Toolkit, the report format for Word reports is .doc format, and for Excel spreadsheets is .xls format.  These are binary files whose format is proprietary to Microsoft.  If you're talking about an HTML report, obviously the generated file is a .html file that is viewable in a standard text editor.  And for Standard Reports, there is no file generation (they get sent straight to the printer).
    Hope this helps,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for

  • How do I change page orientation in the latest version of numbers?

    IT seems that each subsequent update of I works removes features that I found VERY helpful in the past. I cannot seem to find a way to format the page in the latest version of numbers.

  • Audigy 4 connected to Altec Lansing ADA

    Hi I have just got a Audigy 4 card and Altec Lansing ADA880 Dolby digital speakers. When I connect them using the analog socket in my speaker system there is no sound in the 2 rear speakers , how do I fix this ? as there used to be sound with my prev

  • Testing of File2File scenario

    Hi All, i have one problem in my file to file scenario, that is the file is picked by the sender adapter engine and not reached to the Integration engine. In message monitoring it displays "0 messages found". In SXMB_MONI, i got "No messages availabl

  • Windows home folders

    Hello, What are you guys doing for Windows clients on your network? Right now I am looking through the server essentials book but looking at ideas. Can you only do mobile accounts where the data is just stored on the server or can you do a sync funct

  • Using XMLencoder/decoder to save GUI -- why?

    In my last project, I spent a good deal of time writing functions to save and load a project to a local XML file with my own XML format (I was not using Java for this project). I just began looking into XMLEncoder and XMLDecoder and I wrote a simple