Changing Report column attrib. on runtime (or another solution wellcome!)

Hi:
New to Apex ( old experience in Forms ). I'm using Apex 4.1 and I've a Master-Detail page created with the wizard. I wanna be able to accept inserts ( new registers ) in the detail region but no updates. I can accomplish this in the master region with the "Read only condition type" section for an item, but this section doesn't exists for the Detail region items. Can i change the column attribute ( Display As ) from a reports in runtime ? My idea is : In the detail region, if it's a new register, show the item like a LOV ( it's how I've defined it in the Application Builder ) but if data exists for this register, show the item like a "Display as text" ( not editable ). If this is not possible, can you point me into the right direction to accomplish this need?
TIA and sorry for my poor english

Yes,
What you should do is twofold:
1. make items readonly in your form when a record is "not new" (ie the rpimary key is set)
2. prevent the page from executing an update (you never know who/what is spoofing your pages)
the second can be done by creating a process "ON UPDATE" that triggers an error.
Regards,
Richard
blog: http://blog.warp11.nl
twitter: @rhjmartens
If this question is answered, please mark the thread as closed and assign points where earned..

Similar Messages

  • Change download columns from report

    Hi! I have a report, with some columns and I'd like to change the columns when downloading as csv file.
    Let's say that I have a report with col1,col2, col3,col4 and some hidden columns: col5, col6, col7. When I download the file I'd like to have only
    col2, col3, col6, col7.
    How can I do this?
    Thanks!

    Currently there is no way to do this. The CSV export function just re-runs the exact same report as you see it on the screen and transforms it to CSV format.
    Another option is to create a report with the columns you want in the CSV on another page, and use the export:CSV template as in
    http://tinypic.com/jzya2t.jpg
    and provide a link to that page. This will run that page and instead of showing the page it will popup the File download box.
    Hope this helps.

  • *** Canu2019t Change ServerName or DatabaseName At Runtime In Crystal Report!!!

    Canu2019t Change ServerName or DatabaseName At Runtime In Crystal Report. Why?
    HI thereu2026 This is just a simple Winform(not ASP) with a Crystal Report Viewer control on it that was called by another simple WinForm. Iu2019m trying to simply change the Server Name for a Crystal Report at runtime and it will not let me. Hereu2019s the code below. The database is identical to my development server database. This should be easy to do as I did below. I use SQL Server 2005(SPK 2) and Visual Basic 2008. I use the Crystal Reports 2008 standalone designer(seperate program), not the older one in the VS IDE. When I run the code it accepts changes to the user name and password but ignores any change to the ServerName or DatabaseName. Why?
    Mike in Los Angeles, Calif, USA
    Imports CrystalDecisions.CrystalReports.Engine
    Public Class CrystalReportForm2
        Private Sub CrystalReportForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            CrystalReportViewer1.LogOnInfo = New CrystalDecisions.Shared.TableLogOnInfos()
            Dim LogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
            LogonInfo.TableName = "clients"
            'Force crystal report to use a different server AT RUNTIME than the development server!
            LogonInfo.ConnectionInfo.ServerName = "DATASERVER2"    u2018<- ignores changes to this!!
            LogonInfo.ConnectionInfo.DatabaseName = "CMSDATASQL"   u2018<- ignores changes to this!!
            LogonInfo.ConnectionInfo.UserID = "SQL_USER"           u2018<- accepts changes to this!!
            LogonInfo.ConnectionInfo.Password = "34567WERTD"       u2018<- accepts changes to this!!
            CrystalReportViewer1.LogOnInfo.Add(LogonInfo)
            'Testing only below!
            ' MsgBox("ServerName =" & CrystalReportViewer1.LogOnInfo(0).ConnectionInfo.ServerName)
            'MsgBox("DatabaseName =" & CrystalReportViewer1.LogOnInfo(0).ConnectionInfo.DatabaseName)
            CrystalReportViewer1.SelectionFormula = "{openclientsquery.lastname} like  'c*'"
            'CrystalReportViewer1.SelectionFormula = "{clients.clientid} = '1111111'"
            CrystalReportViewer1.Refresh()
        End Sub
    End Class
    Edited by: Mike JJJ on Dec 25, 2008 7:26 PM
    Edited by: Mike JJJ on Dec 25, 2008 7:30 PM

    Yes, you have to simply loop through all the tables in the report and assign each one the same logon info and then reassign the report and refresh the report viewer. No need to use a .Net Dataset here. Eventhough I got the answer myself from studying the Crystal API reference thanks to all that answered! Hopefully this will help others. Mike in Los Angeles, Calif, USA.
    Imports CrystalDecisions.CrystalReports.Engine
    Public Class CrystalReportForm2
        Private Sub CrystalReportForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim MyReport As New Clients 'Instance of report!!!
            Dim myLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
            Dim myTable As Table
            For Each myTable In MyReport.Database.Tables
                myLogonInfo = myTable.LogOnInfo
                myLogonInfo.ConnectionInfo.ServerName = " DATASERVER2"
                myLogonInfo.ConnectionInfo.DatabaseName = "CMSDATASQL"
                myLogonInfo.ConnectionInfo.UserID = "SQL_USER"
                myLogonInfo.ConnectionInfo.Password = "34567WERTD"
                myTable.ApplyLogOnInfo(myLogonInfo)
            Next myTable
            CrystalReportViewer1.ReportSource = MyReport
            CrystalReportViewer1.SelectionFormula = "{openclientsquery.lastname} like  'c*'"
            CrystalReportViewer1.Refresh()
        End Sub
    End Class
    PS - Hopefully, in the future Microsoft will improve(and document) its own report control and designer. Right now it's still crude and needs a lot more development to approach the usefulness that the Access Report Designer has. It's rediculous to depend on a third party reporting control(all business programs require reporting) when Visual Studio should have had/built one included from day one.

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • Can we change the background color of a Standard report "column"?

    4.2.1
    Theme 24 - Cloudy
    Hi There,
    I searched this forum and online but did not get a straight forward way to change the color of a standard classic Apex report column. I want the whole columns background color to be blue. I tried some of the suggestions for using span etc, but they did not work.
    Was wondering if anyone has a solution for this? would be very helpful!
    Thanks,
    Ryan

    Use a custom named column report template with <tt>&lt;colgroup&gt;/&lt;col&gt;</tt> and CSS as in these threads.
    Could also be done with JavaScript, but if the entire column is to be coloured (rather than individual cells based on some condition), the template approach will be simpler and have better performance

  • How to change report displayname at runtime when run from the report server?

    hi all,
    with the reportviewer widget in a winforms app, i'm able to change report displayname at runtime by handling thesubmittingparametervalues event like so:
            private void reportViewer1_SubmittingParameterValues(object sender, ReportParametersEventArgs e)
                string po = e.Parameters["Order"].Values[0];
                this.reportViewer1.ServerReport.DisplayName = "Load Out - " + po + " - " + DateTime.Now.ToShortDateString();
    question: how do i achieve the same thing when the report is run via the ssrs reportserver website?
    thanks for any tips,
    sff

    Hi sherifffruitfly2,
    According to your description, you want to change the display name of report in Report Manager. Right?
    In Reporting Services, we can't make the report file name dynamically. But we have Build-in Fields to show report name and execution time in a report. We can add a textbox and put in the expression below:
    ="Load on- "+Globals!ReportName+" "+Globals!ExecutionTime
    It will show the report name with execution time when we run the report:
    Reference:
    Built-in Collections in Expressions (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to change the order of report columns

    Hi guys,
    I am newbie to the Apex 3.2. I am not finding option to resequence the column display. e.g.
    My columns shown as Org ID, Create Date, Update Date, Name.
    I want to change it to Org ID, Name, Create Date, Update Date.
    This in tabular form. Any help would be much appriciated.
    Thanks
    Sushil

    Hello Sushil,
    Go to Edit Page XX link at the bottom of the page. In the edit page under the Regions section you will see your tabular form listed. Click on the "Report" link next to your tabular form link. You will see all the report columns with up and down arrow images to the right of the columns. Just click on the images to move the columns as you like and then click on "Apply Changes" button to save the changes. Run your page and you will see the changes.
    Thanks,
    Machaan
    P.S: Please assign correct answer points if this helped you with your problem :)

  • Navigating from detail level column in an hierarchy  to another report

    I have a requirement as folllows:
    In one report,i have a drill-down feature enabled on "TIME DIM".
    At The detail level of this dimension is "DAY" column.
    SO,from this detail level,when i click on "DAY" column, navigation should be done to another report..
    Is it possible to navigate so from detail report..
    pls let me know the solution for this requirement..
    thanks,
    seeusass

    Instead of Drill down,Give Navigation in first report to child report.But for this you need to create n reports if you are having n number of levels in hierarchy.Then at the detail level report you can give navigation at day level.
    Thanks
    Don

  • Changing the order of report columns

    Hi
    I am using Application Express 4.1.1.00.23 and have created a report. What I can't seem to alter however is the order of the columns generated by the report.
    It's not based on the SQL query because for example the 'Surname' field is 2nd in the select statement but on the report view the Surname column is the last column.
    Is there a way of changing the order??

    Simple, Edit your report page > under region click Report hyper link corresponding to your report.
    There you will see list of columns where you can order the report columns using little icons on the far right. remember to click apply changes after re-ordering the columns.
    Thanks

  • Changing contents of Report column

    Hi,
    I am trying to implement basic edit-in-place feature in my report. The way it should work is that when user clicks on any column, the column becomes editable and user then is allowed to changed the text. When the user is done, he clicks on save to save the changes. The changes are then saved to database using AJAX calls and the change is reflected on the page also.
    I am able to save the changes to database. but I am not able to change the text in the report column.
    The way I am doing it is as follows:
    each column in the report is of the form:
    < td >< div onclick="somescript" > text < /div > < input type="text" > < /input> < /td >
    I toggle the visibility of the div and input tags based on user click.
    when user clicks on a column, <div> is hidden and <input> is shown. user changes the text and clicks save. At this time, AJAX calls are made to update the database and <input> is hidden and <div> is shown again.
    But before <div> is made visible, I need to change the original text to the new value. Is there any way this text can be changed?
    You can see the short example at:
    http://apex.oracle.com/pls/otn/f?p=22112:19:152048373623770:::::
    I have put some alerts for debugging purposes. Please click "OK" each time to continue.
    Message was edited by:
    Ketan
    Message was edited by:
    Ketan
    Message was edited by:
    Ketan

    Hello Ketan,
    Please check the following steps . Hope this would help you.
    You have to follow the following steps :
    1.Create a report , which is updatable.
    You can change the report type to SQL Query Updatable report.
    2.Go to the report attributes , then click on the edit link of the filed.
    3. Make the field 'Display as Text Field '
    Report part is done.
    In this report region, create two buttons with labels
    1) update
    2) add row
    update you can use to apply changes.
    let me explain about add row.
    create a process which is of type 'Data Manipulation'.
    Make this process run conditional : Say only when add row button is clicked.
    Now run the page , the report would display if the query is like
    'SELECT id FROM emp'
    it would list the ids which exist.
    if you press on add row button, one more text box will be added and you can enter some id /data there and press on update ( you have to write process for update ), table would contain the latest data.
    This is not exactly what you require.
    Here I have used 'ADD ROW ' button to add one text box. and you can add some text there and press update ( you need to create a update process for that particular table )
    Your query was based on some link. I think you can change my code as per your requireement.
    Any queries , please let me know.
    Regards,
    Archana Hebbar

  • Reference report column from another page?

    I have a work order report with column link. Upon clicking link, control goes from page 2 to page 3 where I want to show details about components in work order. How do I reference the work order ID (report column on page2) from the query in page 3? I know I can reference page items, but how do you do you pass a value of a report column on the previous page?
    Thanks.
    Paul

    Hi Paul,
    Typically I would create an Item on the page being called (Page 3 in your case) to receive a value being passed via your Link; this item could be hidden or read-only. You might want to name yours; P3_WORK_ORDER_ID or something to reflect the Primary Key (PK) of your Work Order.
    On the Link Column on Page 2; I assume that your Target Page is 3.
    Down in the Link Column section under Name and Value ;
    Name might read P3_WORK_ORDER_ID
    Value might read *#WORK_ORDER_ID* this would reference the work order id column on the Page 2 report.
    Now on your Page 3 report; your SQL would need within its Where clause something like this:
    my_table.work_order_id = :P3_WORK_ORDER_ID
    Jeff

  • How to change report query dynamically in Oracle APEX?

    Hi,
    I want to dynamically change the where condition in APEX report query. Can anyone help me solve my this problem?
    (Just want to change the query which we change in Oracle Reports using lexical parameter to change &Where, &Order by etc. dynamically!!)
    Thanks, Praful

    Hi
    I've been using flexible queries in APEX for a few years now, and your question just added a whole new dimension to the flexible and powerful nature or writing reports in APEX.
    While APEX Interactive reporting has almost completely removed the need the equivalent of Lexicals in Oracle Reports, I thought it might be fun to try and use lexicals in an APEX report.
    Before we start I should summarise the powerful capability of APEX reporting to have oprtional parameters (lots and lots of them if this is needed).
    For each parameter, you simply add a page item which will hold the value of the parameter.
    The item/parameter can be populated by typing in the value, defining an LOV, using a date-picker etc.
    To make the parameter optional simply use an OR in the where clause.
    So for a apge item P200_PARAM1.....include
    WHERE (:P200_PARAM1 IS NULL
    OR COLUMN1 = :P200_PARAM1)
    This way you can either leave the page item null or type in / select a value from a LOV.
    There is a small quirk in APEX LOV's which sometimes returns a value of '%' or '%null%' - depending on the version - when no value is selected.
    See Patrick Wolf's solution for this at Re: Null value handling in LOVs
    I include this Application Process in all my APEX applications ;)
    Now let's look at using the equivalent of Oracle Reports Lexicals......
    First-off - this is based on the APEX SQL report - NOT Interactive Report.
    It relies on the fact that you can let the query be parsed only at runtime.
    1. Define an SQL report entering the 'core' of your query.
    With a query like SELECT ENAME, JOB FROM EMP
    Select 'Generic Columns' option in the 'Column Headings' section
    Finish the report creation
    2. Define a page item - say P200_LEXICAL - type text on the page
    3. Edit the report and update the SQL query to include your lexical page item
    SELECT ENAME, JOB FROM EMP &P200_LEXICAL. (REMEMBER THE '.' AT THE END)
    Ensure that the option "Use Generic Column Names (parse query at runtime only)" is selected at the bottom of the query
    4. Add a button to the page -using 'Create a button displayed among this region's items' the will submit the page.
    5. Run the page - you will see all the employee names and job desdriptions
    6. Enter a where clause into the 'Lexical' textbox - say "WHERE ENAME LIKE 'K%'" and click the 'Go' button
    Voila! your where clause is magically applied.
    Try any variant you like adding an ORDER BY clause etc...... this is FUN!
    7. Clear the value of the LEXICAL and click go.
    Edit the report and move the &P200_LEXICAL. into the selected columns (or add another one)
    SELECT ENAME, JOB &P200_LEXICAL. FROM EMP
    8. Run the page
    Enter ",SAL" in the textbox and "Go"
    We can add as many columns as we like (subject to the "Maximum number of generic report columns:" set below the SQL query in the report edit section)
    Now because we have all the flexibility in APEX of setting page items using SQL or PLSQL you can set the value of the lexical programatically, or just pre-set a few values in an LOV - the options are limitless.
    While I've never had the need to use lexicals - you can see that APEX provides the most Flexible Lexicals in town.
    Eat your heart out "Oracle Reports"!!!
    Have fun
    Mike

  • Maximum number of generic report columns

    Clicking the "Use Generic Column Names (parse query at runtime only)" radiobutton makes the "Maximum number of generic report columns" a editable field with a default of 60.
    This seems to be a new feature in 2.0, right?
    So, is 60 columns not the hard maximum number of columns in a report anymore? What is the new limit? What if I type 200 in that text box?
    Thanks

    and then use the column names as headings. We will
    improve the usability of the report attributes page
    in the next version of HTML DB and let users edit all
    column attributes.While we are on the subject...
    Re-ordering columns on the report attributes page is a huge pain. Doing them one at a time and page refreshing after each up/down arrow is very very slow.
    Why dont you guys use some of the nifty drag-n-drop features from the Query Builder to do this re-ordering? That would be spiffy.
    Another option is to just add a editable text field on each row to represent the column sequence #. I could just re-order a bunch of columns by changing this sequence number and click Save and the page refreshes and re-orders the list by this sequence number. Of course, there would need to be some Javascript to ensure that I dont give the same sequence number to more than 1 row.
    [Netflix uses both the techniques above to let customers reorder movies in their queue]
    Thanks,
    Vikas

  • Interactive Report Column Headings and Row Height

    I am using the div style="width:350px;" method to control the width of columns in various interactive reports. That works fine except for the following:
    1. When creating filters, the <div...> stuff shows up along with the actual column heading, thus confusing some end users
    2. Even when I uncheck the "Use same text for single row view" checkbox and then provide a simple single row view label, the <div> stuff still shows up on the single row view
    Does anyone have a better solution?
    Also, does anyone know of a way to limit the row height within an interactive report row? I have some columns of data that contain a large amount of HTML data and I'd like to be able to limit the number of rows that show on the report.
    Is Oracle planning to provide some better control over the Interactive Report columns in another version? The Interactive Report is such a huge improvement in usability in APEX - it would be great to take it to another level by providing some better control over column width and row height.
    Edited by: DaleB on Jun 18, 2009 8:54 AM
    Edited by: DaleB on Jun 18, 2009 8:54 AM

    Dale,
    Unfortunately we don't have much we can use to do what you would like. I would have said it's impossible until version 4 but you could actually do something similar to what Roel has done. His trick is in the edit button. He changed the edit button to use an "onload" call to a JavaScript process. You could do the same but call a process that goes across the rows and styles each column. Now because you don't have a way to identify the column (can't use the order because the end user could change it) you'll have to write the code to look at the top row first and then style the appropriate column. As far as I can tell, this would be quite difficult and inefficient. Having said that if you need it that bad and would like some help with it, put up an example application on apex.oracle.com and provide the workspace/username/password and I'll take a look.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to display special characters in APEX Classic Report column

    Ref: Thread: How to display newline characters as new lines
    Version: APEX 3.2
    Hi,
    I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
    Thanks very much.
    Rohi
    Edited by: Rohi on 18-Jul-2012 04:21

    876651 wrote:
    Hi,
    Thanks for your response.
    I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
    This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
    But it is not displayed like it should be.
    I do not want the value to be displayed along with the html tags as a string.
    I want the html tags to take effect and highlight the value within it.
    Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
    So I changed it to 'No' and and it contained the html tags.
    I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
    You can't pass HTML and CSS around in URL parameters.
    I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
    decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
    I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
    <span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach...

Maybe you are looking for