Report format - distance between rows

Hi,
After formatting a output(report), the distance between rows is much bigger than on output w/o format.
What parameter controls the distance between rows?
How to make the output/report more dense in row sense?
Thx,

Use BREAK ON column-name SKIP n
where n is how many lines to skip:
sql>create table t (one varchar2(3), two number );
Table created.
sql>insert into t values ('aaa', 1 );
1 row created.
sql>insert into t values ('aaa', 2 );
1 row created.
sql>insert into t values ('bbb', 3 );
1 row created.
sql>break on one skip 2;
sql>select * from t;
ONE TWO
aaa 1
2
bbb 3
(note: this doesn't display in "preview" with correct formatting so just try it and you'll see)

Similar Messages

  • 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.

  • Shrink the space between rows in a report

    hi all,
    As the subject says, I am trying to shrink the space between rows in a report so that there is no space between rows when i print it. Does anyone know how to do this? Do I need to make a custom report template for it?

    The space between rows in a report in Apex is frequently determined by the cellpadding and cellspacing attributes of the TABLE tag that makes up the innermost report area, but there also other factors that may affect the resulting area, so one has to look at the specific case and see what is determining the final result, bearing in mind that it's quite possible that two browsers will display the same thing differently.
    At any rate, spacing is normally controlled by fine-tuning margin and padding properties in CSS.
    As CSS stylesheets, as per their name, are applicable in cascade, you can add your own CSS stylesheet in the page header (after the built-in ones).
    If you are using Firefox (with Firebug add-on installed) or Chrome or Safari, you can easily experiment with these properties and see the effects by temporarily setting or unsetting certain values and when you are satisfied, you can copy the resulting definitions into your stylesheet.
    The fact you want to make some adjustments only when printing can be solved by means of the @media rule inside the stylesheet or by linking different stylesheets depending on the value of the media attribute in the LINK tag or by dynamically pointing to different stylesheets depending on whether Apex is rendering the page in printer-friendly mode or not.
    Flavio
    http://oraclequirks.blogspot.com

  • 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

  • Accurate distance between points, lat/long to miles?

    Hi,
    I have a bunch of points as lat/long data in SRID 8307 format. From reading this forum, I understand than in Oracle 8.1.7 to get accurate distances I need to transform these points into a cartesian coordinate system.
    My data is US-based, so I am using SRID 32775 in a command like the following:
    EXECUTE SDO_CS.TRANSFORM_LAYER('restaurant_locations', 'location', 'restaurant_locations_32775', 32775);
    This creates a new table with new point geometries and a rowid that I assume points back to the original 8307 table.
    I've tried creating an index on the new table with cartesian coordinates, but I get this error:
    CREATE INDEX restaurant_csp_idx
    ON restaurant_locations_32775(geometry)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS('SDO_LEVEL=9 sdo_commit_interval=1000 layer_gtype=POINT' );
    2 3 4 CREATE INDEX restaurant_csp_idx
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13200: internal error [POINT] in spatial indexing.
    ORA-29400: data cartridge error
    ORA-13003: the specified range for a dimension is invalid
    ORA-06512: at "MDSYS.MD", line 1673
    ORA-06512: at line 1
    ORA-13003: the specified range for a dimension is invalid
    ORA-06512: at "MDSYS.MD", line 1673
    ORA-06512: at line 1
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 8
    ORA-06512: at line 1
    Here's the entry for the 32775-transformed points in the metadata table:
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES (
    'restaurant_locations_32775',
    'geometry',
    MDSYS.SDO_DIM_ARRAY( -- 20X20 grid, virtually zero tolerance
    MDSYS.SDO_DIM_ELEMENT('X', 1951908.05, 16230214.8, 0.005),
    MDSYS.SDO_DIM_ELEMENT('Y', -6858801, 13168375.5, 0.005)
    32775 -- SRID (reserved for future Spatial releases)
    My questions are;
    Do I need to build a new spatial index? It seems like once I transform the lat/long data to cartesian I need to build a new index as well ( on the 32775-transformed table ).
    Is this the best way to approach distance queries with lat/long data? It seems like a lot of work, plus the second index and table really add to the overhead if a location changes.
    Any ideas on why I can't build an index on the output table from my SDO_CS.TRANSFORM_LAYER() call? I used SDO_TUNE.ESTIMATE_TILING_LEVEL() and SDO_GEOM.VALIDATE_GEOMETRY() and got no complaints. I'm at a loss.
    I also can't seem to get set autotrace to work. It works fine for any non-spatial query, but if I try to trace a spatial query, I get this error:
    SQL> SELECT /*+ INDEX(restaurant_locations restaurant_sp_idx) */ r_a.restaurant_id
    FROM restaurant_locations r_a, restaurant_locations r_b, user_sdo_geom_metadata m
    WHERE r_b.restaurant_id != r_a.restaurant_id
    AND SDO_GEOM.WITHIN_DISTANCE(r_a.location, m.diminfo, 1, r_b.location, m.diminfo) = 'TRUE'
    AND r_b.restaurant_id = '5999';
    2 3 4 5
    RESTAURANT_ID
    456999
    456999
    Execution Plan
    ERROR:
    ORA-01031: insufficient privileges
    SP2-0612: Error generating AUTOTRACE EXPLAIN report
    Statistics
    49 recursive calls
    28 db block gets
    83 consistent gets
    0 physical reads
    0 redo size
    415 bytes sent via SQL*Net to client
    425 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    11 sorts (memory)
    0 sorts (disk)
    2 rows processed
    I've looked at the arraysize, and I've made sure to run the trace-enabling sql and granted plustrace to my DB user.
    Thanks for any help,
    _jason                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Jason,
    The error on the index create is likely due to data being outside the bounds of the coordinate system as specified in user_sdo_geom_metadata.
    If the data is stored in the point field then you can check the bounds by doing queries like the following, altering them for your table/column name (my table is cities_test, the geometry column name is location):
    SQL> select min(a.location.sdo_point.x) from cities_test a;
    MIN(A.LOCATION.SDO_POINT.X)
    -157.80423
    SQL> select max(a.location.sdo_point.x) from cities_test a;
    MAX(A.LOCATION.SDO_POINT.X)
    -71.017892
    SQL> select max(a.location.sdo_point.y) from cities_test a;
    MAX(A.LOCATION.SDO_POINT.Y)
    61.178368
    SQL> select min(a.location.sdo_point.y) from cities_test a;
    MIN(A.LOCATION.SDO_POINT.Y)
    21.31725
    Do you need to build a spatial index?
    Only if you are going to use spatial operators such as sdo_filter, sdo_relate, sdo_within_distance, and sdo_nn. If you have no requirements for these operators, then there is no reason to build a spatial index. From the trace query at the end of the posting, I suspect that you will need to have a spatial index.
    Is this the best approach? Maybe, it depends on what your requirements are. If the data is static and performance is your highest priority, then maybe it is. If you have a requirement for a spatial index, then certainly it is. If you are only getting the distance between a few few known geometries, and you don't care about the time it takes to convert data on the fly, then you can use the sdo_cs.transform function within the sdo_geom.sdo_distance function to convert both geometries to the equal area projection.
    The validation routines should have caught this - I checked and they do not for 8.1.7, and they do for 9i.
    Regarding the set autotrace command, I'm not sure why it isn't working for you. It works for my generic scott/tiger account from a typical install.
    hope some of this is useful.
    dan
    null

  • How to get this report format out ?

    Hello all experts,
    Sample table creations like the following. Note checkno under xcheck table is not unique. Have tried pivotting the xcheck table then link pivoted xcechk with xcert using certno and invno but this willl end up getting duplicate records. Can u please help ? Basically I am stuck at how to get that vendor name out on the report
    create table xcert(
    certseq number primary key,
    certno varchar2(5) not null,
    vendor varchar2(25));
    create table xcheck(
    checkseq number primary key,
    checkno varchar2(8) not null,
    invno varchar2(100);
    Xcert Data
    certseq certno     vendor
    1     C1001     BP GAS
    2     C1002     BUG PEST CONTROL
    3     C1003     BP GAS
    4     C1004     BP GAS
    5     C1005     WILLIES BESTxcheck Data
    checkseq     checkno          invno
    1          EF500001     C1001,C1003,C1004
    2          EF500002     C1002
    3          EF500002     C1005Looking for a following report format
    checkno          invno               vendor
    EF500001     C1001,C1003,C1004     BP GAS
    EF500002     C1002               BUG PEST CONTROL
    EF500002     C1005               WILLIES BEST      Thank you
    Munshar

    Hi, Munshar,
    MunSharmi wrote:
    Frank,
    "I don't see why you would need another column. What would you need to store, or retrieve, that a table like this wouldn't allow?
    Notice my orignal xcheck table data plus a check date column
    {code}
    checkseq     checkno          invno               checkdate
    1          EF500001     C1001,C1003,C1004     11/01/2010
    2          EF500002     C1002               12/10/2010          
    3          EF500002     C1005               01/01/2011
    {code}Sure, if you have other data that you haven't mentioned yet, then you need other columns, and maybe even other tables, to store that data.
    Talking about this would be a lot easier if you described what you were trying to model in these tables, and what the different entities are.
    after nomalization
    {code}
    seq(PK)     checkseq     checkno          invno               checkdate
    1     1          EF500001     C1001               11/01/2010
    2     1          EF500001     C1003               11/01/2010
    3     1          EF500001     C1004               11/01/2010
    4     2          EF500002     C1002               12/10/2010          
    5     3          EF500002     C1005               01/01/2011
    {code}What do checkseq and checkdate represent? What is the realtionship between them? If there is another row with checkseq=3, will it necessarily have checkdate=01/01/2011? If there is another row with checkdate=01/01/2011, will it necessarily have checkseq=3?
    Shouldn't I need to have the extra seq(PK), then use check seq to group the data report to meet users' target format ? Please adviseIt depends on what your entities are. If you explain that, then perhaps I can give some advice about how to model them.
    In general, every type of entity requires a separate table. It looks like xcert represents one kind of entity, uniquely identified by certno. I assume there is some other kind of entity, uniquely identified by checkno, and that you have a table for that which you haven't needed to show in this thread.
    Are you saying that there's some other entity, that is uniquely identified by checkseq? If so, it probably needs a table of it's own.
    Every table should have a primary key. I had assumed that checkseq only served as the primary key of the xcheck table. If it serves some other purpose, then yes, you would need another column.
    Many-to-many relationships usually require a separate table. I was guessing that xcheck was intended to record a many-to-many realtionship between xcert and some other table. Guessing is not always the best way to solve problems. I think it would be better if you explained what you want to do, rather than have me guess at it.
    So far, what you've shown is analagous to an order entry system. One kind of entity is customer, another is supplier. Say you're running a company that sells products from many suppliers to many customers. There is a many-to-many relationship between customers and suppliers. Any customer may buy from many suppliers; any supllier may sell to many cutomers. You may have an orders table that keeps track of that many-to-many relationship. You may also have another entity, salesman, that also has many-to-many relationships with customers and suppliers. Depending on what exactly you consider an "order", there are lots of different ways to model this. Can a single order involve many customers? Can a single order involve many suppliers? Can a single order involve many salesmen? If an order always involves one customer buying from one supplier using one salesman, then you may only need four tables. If the situation is more complicated, then you may need more tables.

  • PDF TEMPLATES ISSUE...DISTANCE BETWEEN LINES

    Hello People... after a read the manual i tried to do a pdf template based on a legal asset map.
    in Manual i read this
    'Note: The placement of this field in relationship to the
    BODY_START tag defines the distance between the repeating rows
    for each occurrence. See Placement of Repeating Fields, page 8-15.'
    My template have fixed lines and what i want to do is for each ocurrence put the data inside of line of the template. i tried to adjust commanding the space of start body form field and the repeating group field. Some rows stay's inside of the lines of my template but some rows don't. someone know's a way to do this? i dont understand why the distance between the rows have variations and dont stay always at the same distance of the previous line. I can send my output to anyone.
    Tks in advance.

    Kenoli,
    The objects are interacting because they are Inline (Moves with Text) and/or you have "Causes Wrap" turned on.
    With the object selected, go to the Format Pane and the Arrange Tab, set the Object Placement the way you want it and adjust Text Wrap to None.
    Jerry

  • Increase distance between objects w/o resizing the objects

    Is it posible to increase distance between objects in illustrator cs3 without resizing the individual objects?
    For example, I have a series of circles separated from one another by about 20 pixels, aligned into a grid-like formation.  I would like to increase or decrease the distance of the circles from one another, without changing the size of the circles themselves.
    Thanks,
    Regina

    As Chris said, use the Distribute functions of the Align Palette. Assume a 5 x 5 array of circles separated by 20 points in each direction. You now want the array spacing to be 30 points.
    1. Black Pointer: drag a marquee selection across the top row of 5. Then click once on the leftmost one.
    2. Align Palette: Show Options. In the distance field of the Distribute area, enter 30. Click the Distribute Horiizontally button.
    3. Select and group each of the other four rows.
    4. Select the four rows and one of the top row's circles. Click once again on the selected top row circle.
    5. Align Palette: Make sure the 30 value is still there. Click the Distribute Vertically button.
    JET

  • VS2005 - Crystal Report Formatting Problem

    Hi,
    We have a text object in crystal report designer (ASP.NET) which has static content in bold and justified format.The report should be printed in Portrait mode. While printing the report, the space between the words in the static content is getting truncated. Please suggest a solution.
    We are using crystal report that comes with VS2005.
    Thanks.

    Make sure you are using SP 1:
    https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe
    See if using the option "No printer" helps (under Page Setup).
    Make sure you are using the latest printer driver.
    If the above does not help;
    Are you seeing the issue on your development computer, or after you deploy to a server?
    Does the worker process on the server "see" the printer driver? To check this, use the following code:
    Dim myPrinter As String
    For Each myPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters
        Response.Write(myPrinter)
        Response.Write("<BR>")
    Next
    Search the [notes database|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true] for similar issues.
    Ludek

  • Inserting static text in between rows returned from a pivot table

    Is there a way to type static text (eg. “Note that the data for Land has an accuracy of 98%”) in between rows returned from the dataset in the rtf template. The alternative would be to break the BI analysis report (which is the source of the template data) into 2 parts and then insert each part into the template one below the other with the text typed in between.

    Oracle support has confirmed that this requirement is not possible to implement

  • 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

  • Report Format like HFM

    Hello All,
    I am trying to replicate a report format that is identical to HFM Reporting and Excel add in in Essbase. Here is the Format how it looks like
    Column-1 Column 2(Sales)
    Prod Level 1     
    Prod Level 2a     
    Prod A 100
    Prod B          200     
    Prod C          300
    Prod Level 2a Total                  600
    Prod Level 2b
         Prod D     300
         Prod E      200
    Prod Level 2b Total                  500
    Prod Level 1 Total                     1100
    This is a 3 level hierarchy Prod dimension(Prod level1 - prod level 2(prod level 2a, prod level 2b)- prod level 3(prod A, B, C, D, E)). so when we try to implement this in OBIEE we end up having 3 columns one for each level of the Prod hierarchy.
    But the business wants this in one single column which has all the children from all the subsequent levels idisplayed in ths same column. So this is like more or less replicating P&L reports in HFM or replicating the essbase excel add in reports.
    is there any way to get the desired format? i am thinking about Publisher but I dont know if that can be done or not
    Any suggestions would be appreciated
    thanks in advance
    Prash

    Thanks for your suggestion and that approach will just give me all the levels of children in one row. But i need them in multiple rows but just under one single column
    I want them like
    Column 1
    Prod Level 1
    Prod level 2
    Prodl level 3
    and also grand totals at each subsequent levels. but concatenating or string operations gives me in one single row as below(which i dont need) and also i will not be able to group them total wise.
    Column 1
    Prod level prod level2 prod level 3
    Thanks
    Prash

  • Risk Analysis Reports Format

    Hello Experts,
    What is main difference between Risk Analysis Report Formats ....
    Summary
    Detail
    Management Summary
    Executive Summary
    Please explain in depth and which scenarios we are using these reports. Please give a one business example.
    Regards,
    Babu

    Dear Babu,
    trying to help you.
    Summary: gives you an overview of conflicts on action level. Can be used to discuss with business what is causing the risk.
    Detail: gives you an overview of conflicts on authorization level. Can be used to analyze how a conflict can be removed.
    Management summary: gives you an overview of risks on user level. Can be used to report how many risks are currently in the system on user level. E.g. userA has 3 risks, userB has 2 risks, etc.
    Executive Summary: gives you an overview of risks on risk level. Can be used to have a general overview of applicable risks in the system. E.g. riskA has no conflicts, riskB has 7 conflicts, etc.
    Best if you just analyze and you will see the differences. If you have a particular question do not hesitate to contact us.
    Regards,
    Alessandro

  • Report formatting in my way

    I want to make a report which will show my DB table data the way I want.Most report tools just fetch the data and format it in a typical row. But I want to display my row data in a way that I want.For example, I want to show each cell data of a row in a particular place in a report. like- id, top-left, name,top-right
    and so on. I use Jasper report and QBEspress but can they format data this way.if so, can anybody give me a link for the tutorial.

    Hi Meenu
      I'm using the EPM report formatting and excel.
    I tried to make a macro run too.
    But when updating loses the reference.
    Following code:
    Private Sub Worksheet_Change (ByVal Target As Range)
    'Validates that was enacted i4 cell
    If Target.Address = "$ I $ 4" Then
         'Colours range from white
         'Record a macro with its original formatting and replace this snippet
         Range ("I11: T11"). Select
         with Selection.Interior
             . = Pattern xlSolid
             . PatternColorIndex = xlAutomatic
             . ThemeColor = xlThemeColorDark1
             . TintAndShade = 0
             . PatternTintAndShade = 0
         end With
         Range ("I12: T20"). Select
         with Selection.Interior
             . = Pattern xlSolid
             . PatternColorIndex = xlAutomatic
             . ThemeColor = xlThemeColorAccent2
             . TintAndShade = 0.799981688894314
             . PatternTintAndShade = 0
         end With
         'Sets the last column to be colored
         Order = Replace (Format (Target, ">"), "V", "") + 8
         'Tests whether the final column is greater than 8
         End If> 8 Then
             'Colours range.
             'In this case the first line is 11 and the last line is the 20, but can be changed according to the need
             For Each C In Range (Cells (11, 9), Cells (20, End))
                 C.Select
                 with Selection.Interior
                     . = Pattern xlSolid
                     . PatternColorIndex = xlAutomatic
                     . ThemeColor = xlThemeColorAccent1
                     . TintAndShade = 0.399975585192419
                     . PatternTintAndShade = 0
                 end With
             Next
         end If
    end If
    Range ("$ I $ 4"). Select
    end Sub
    Regards
    Thaís

  • Distance between buttons (Flow Layout)

    Hi people,
    I Have 100 buttons inside a JPane with Flow Layout.
    How do I set the distance between the buttons to 0(width and height)?
    Regards.
    Thank's.

    Yes, I did!
    I have a class "Board" that extends JPanel with GridLayout.
    This class has a constructor that takes the rows, cols, number of mines and size of squares!
    package view;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.util.Random;
    import javax.swing.JPanel;
    import model.Square;
    import control.SquareHandler;
    public class Board extends JPanel {
         private Square square[][] = new Square[16][30];
         private int mines, width, height;
         Board(int width, int height, int mines, int size) {
              Dimension dimension = new Dimension(size,size);
              //FlowLayout layout = new FlowLayout();
              GridLayout layout = new GridLayout();
              //layout.setHgap(0);
              //layout.setVgap(0);
              layout.setRows(height);
              layout.setColumns(width);
              this.mines = mines;
              this.width = width;
              this.height = height;
              setLayout(layout);
              for (int j = 0; j < height; j++){
                   for (int i = 0; i < width; i++){
                        square[j] = new Square(i,j);
                        square[j][i].setPreferredSize(dimension);
                        square[j][i].addActionListener(new SquareHandler(this, i, j));
                        add(square[j][i]);
              makeMines();
         public void makeMines() {
              Random randomizer = new Random();
              int randomX, randomY;
              for (int i = 0; i < mines; i++){
                   while (true) {
                        randomX = randomizer.nextInt();
                        randomX = Math.abs(randomX);
                        randomX = randomX % width;
                        randomY = randomizer.nextInt();
                        randomY = Math.abs(randomY);
                        randomY = randomY % height;
                        if(!square[randomY][randomX].getMine()){
                             square[randomY][randomX].setMine();
                             break;
         public Square getSquare(int x, int y){
              if (x < 0 || x >= width || y < 0 || y >= height ){
                   // Error
                   return new Square(-1,-1);
              return square[y][x];

Maybe you are looking for