Vertically align a field in details section.

I am new to Crystal Reports so I will do my best to explain what I am trying to achieve......
In MS Excel, it is possible to vertically align text so that it remains in the centre of the cell regardless of the cell height. I would like to do a similar thing in the details section of Crystal Reports.
I have several fields in the details section of the report. They are all in a horizontal line. I have enabled the 'Can Grow' feature for one of the fields so that it will increase in height to accomodate large text entries. I would like the other fields to adjust so that the centres of each of the fields align vertically - in the same way as they would in excel is the text was aligned vertically.
Any advise would be greatly appreciated.

I do not want to horizontally align the writing.
I have 5 fields in a row in the details section. One of the fields (call it field A) can grow to usually no more than 2 lines.
When field A takes up 1 line then the other fields look OK becuase the centres of all of the fields line up.
When field A grows to 2 lines, I would like writing in the other fields to move down slightly so that they align with the centre of field A.
Is this possible?

Similar Messages

  • Change field in detail section

    In crystal report, after I draged a field [Order2009] to the detail section, how to change [Order2009] to [Order2010]?
    I did it as the way below:
    1) delete [Order2009]
    2) drag [Order2010] from field view to detail section
    I do not think this is the best way to replace field.
    Edited by: aspfun on Apr 27, 2011 2:32 PM

    This is the only way to REPLACE a field.
    But if you want to select which field to display based on a parameter for the year you could.
    if {?yearparamter} = 2009 then else
    if {?yearparamter} = 2010 then else
    "oops-wrong year"
    Debi

  • Crystal reports show rows of a field in detail section in number of columns while exporting in ms excel

    Hi,
    I have a crystal report and a field called source.
    The source field can contain more than one records.
    When I export it to ms excel then source field is shown in three rows in excel.
    Name
    Source
    Batch No
    ABC
    A0001
    K1
    K2
    K3
    But now I want to export to excel in the following format
    Name
    Source
    Batch No
    ABC
    A0001
    K1
    K2
    K3
    The Name and Batch No field are in Group Header and Source in detail section.
    Also the Source field can vary in number i.e. there can be any number of Source.
    And I only want this type of output when exporting to MS Excel.
    Is there any way to do this?
    Please reply.
    Thanks.

    Try this:
    1) Create a formula with this code and place it on the Details Section:
    whileprintingrecords;
    numbervar x := x + 1;
    stringvar col1;
    stringvar col2;
    stringvar col3;
    if x = 1 then col1 = {Source}
    else if x = 2 then col2 = {Source}
    else if x = 3 then col3 = {Source};
    2) Create another formula and place this on the Group Header:
    whileprintingrecords;
    numbervar x := 0;
    stringvar col1 := "";
    stringvar col2 := "";
    stringvar col3 := "";
    3) Create three separate formulae - one each for the three Source columns and place these on the Group Footer:
    E.g. for first Source column:
    whileprintingrecords;
    stringvar col1;
    E.g. for second Source column:
    whileprintingrecords;
    stringvar col2;
    Drag and drop these formulae beside each other on the GF.
    4) Move the 'Name' and 'Batch No.' fields from the Group Header to the Group Footer
    5) Suppress Group Header and the Details Section.
    -Abhilash

  • Vertical alignment

    <div class="content">
      <div> (css attribute float : left)
        <img>
      </div>
      <div> (css attribute float : left)
        <table>  (I need this table to align vertically with the image.)
                     (vertical-align : middle   doesn't seen to do anything)
      </div>
    </div>
    I've tried encasing the table in another div and set THAT element to vertically align.
    What am I missing?
    Dana

    Copy & paste this code into a new, blank document.   This layout uses CSS display:table properties to which you can add vertical-alignment.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Layout with Display:Table Properties</title>
    <style>
    body {
    font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
    font-size:100%;
    font-weight:bold;
    background: #FFF;
    width: 90%;
    margin: 45px auto;
    display: table;
    border: 4px solid #90F;
    /**optional rounded borders**/
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    border-radius: 15px;
    section {
    display: table-row;
    background: #FFF;
    margin: 0;
    width: 100%;
    aside.one {
    width: 33%;
    padding: 0 2%;
    background: #F60;
    color: #FFF;
    display: table-cell;
    vertical-align: top;
    aside.two {
    width: 33%;
    padding: 0 2%;
    background: #9F0;
    color: #000;
    display: table-cell;
    vertical-align: bottom;
    aside.three {
    width: 33%;
    padding: 0 2%;
    background: #F09;
    color: #FFF;
    display: table-cell;
    vertical-align: middle;
    </style>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <body>
    <header>This is header</header>
    <section>
    <aside class="one">
    <p>Aside .one has vertical-align:top. </p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Vestibulum gravida metus eu metus elementum in rhoncus nisi cursus.
    Donec hendrerit condimentum ipsum, in sodales dui rhoncus non?
    Nulla facilisi. Nulla porta, dolor et suscipit elementum, sem sem viverra
    arcu, et aliquam elit leo porttitor urna. Praesent tristique lacus a metus
    pharetra quis pharetra sapien laoreet. Nam tempor pharetra magna nec luctus.</p>
    </aside>
    <aside class="two">
    <p>Aside .two has vertical-align:bottom.</p>
    </aside>
    <aside class="three">
    <p>Aside .three has vertical-align:middle.</p>
    </aside>
    </section>
    <footer>This is footer</footer>
    </body>
    </html>
    Here's a screenshot:
    Nancy O.

  • How to align (center) field's content in the section (band) limits

    The environment is: 
    CR version: CR version: CR 10.2.3600
    VS version: VS 2005 Prof + C#
    Application type: Windows application
    The Text objects can have set crHorCenterAlign property. There are no similar crVertCenterAlign property.  So, how can we vertically align the Text objects content in theirs limits.
    It would be usefull to have more properties, I mean something like this: TopAlignment, CenterAlignment and BottomAlignment.  Currenty CR uses TopAlignment as a default settings which cannot be changed and is unavailable for a developer.
    The similar alignments but in section (band) limits would be usefull for objects. For example, when the details rows have different heights which depend on a fields content smaller fields are printed at the top of the section (band). It would be usefull to have the object properties to set how the object is to be aligned in the section limits.
    Please look at this [picture |http://www.zgadzaj.pl/temp/vertical.jpg]. It shows that 2-nd column has larger content, so the section has been expanded. But rest of columns are printed at the top of the band. If we have additional properties than we can decide how objects should be vertically aligned.
    Perhaps I am wrong and there are somewhere vertical alignment setting hidden under different names.
    Regards,
    Marek

    Hi Marek,
    The version that is shipped with Visual Studio is a basic version and set of API`s. For full control you can purchase a full version of Crystal Reports. With this version you have an extended set of API`s with CR assemblies as well as the Report Application Server which runs inProc and has the RCAPI set of API`s that gives you more control on all objects, not fully but they are adding more functions all the time.
    RAS has Alignment API`s available.
    Download a Trial version of CR XI R2 ( SP4 Full build ) and then SP5 which is incremental and then download sample app`s to get you going with RAS.
    Thank you
    Don

  • Details section extends to a whole page when multipage field is printed

    Crystal Reports designer in VS 2005 Prof.  C#
    I have a field which sometimes is large, so it is printed on several pages.
    When a field is small, ie. starts and finishes on the same page, then all is OK. I mean, that Details vertical lines and field borders are closed as soon as the last field is fully printed. Report Footer is propely printed after the last Details row.
    But when a field occupies several pages then, on the last page, the Details section is not closed after the last row but extends to a whole page.
    So, as a result of this behavior, the Report Footer is printed over the Detail's vertical lines. This is my problem.
    I tried the following:
    1. Change setting Keep Object Together - does not help.
    2. Inserting an extra Group Section - Group Footer was printed over on Details body - overlapped.
    To show this problem here are 2 pictures. Please pay attention to the column "Odcinki".
    [The view with a small field|http://www.zgadzaj.pl/temp/KIM_Dobry.jpg]
    [The view with Details expanded to a whole page|http://www.zgadzaj.pl/temp/KIM_Usterka.jpg]
    Marek

    Hi Trevor and Ludek,
    At last success -  I found the workaround!
    Before my give up, during the downloading time of the PerpetuumSoftware report generator, I tested the last idea which comes from [Joe's help posted in this thread|http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/77b28835-12aa-4592-bcc8-c2b8dbf49317].
    I removed all vertical lines from the Detail section and the box surrounding the Detail's section row.
    I inserted a new group section which works exactly as the Detail section, so it changes along with Detail section.
    I put the vertical lines starting from the GroupHeader section and expanded it across the Detail section to the middle height somewhere inside the GroupFooter. And now I set the line's bottom = 0. It means that it ends exactly at the top of GroupFooter section.
    Next, I set the height's of GroupHeader and GroupFooter sections = 0.
    The import things are:
    - vertical lines (box'es) cannot start in the PageHeader, they must start at top of GroupHeader
    - vertical lines (box'es) cannot end in the Detail section, they must end at top of GroupFooter
    And now, it works as I expected. Here is the [PDF example|http://www.zgadzaj.pl/temp/KIM_OK.pdf].
    Thanks to your advices and support I was able to investigate this problem,
    so thank you again for the help.
    Regards,
    Marek

  • CRVS2010 beta -  date field not display in details section

    I use Visual stdio 2010 so i install crystal report 2010 for report.
    It work fine .
    but in report detail section there is date field then it will not be display.
    alos if we do group on date field it will give error when we try to open report.
    Plese geve me possible soluction for date field problem.
    Edited by: hitesh_tatva1 on Jun 22, 2010 11:35 AM
    Edited by: Don Williams on Jun 22, 2010 7:20 AM

    Solution Found
    Don't install sp2it sucksclassic case of the cure being worse than the disease.
    Downloading and installing the SP3 redisist fixed the issue.
    This link is probably appropriate:
    https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm
    Software Product->select Crystal Reports
    Version->select Crystal Reports 2008
    important part
    Software Type->Utility Click Search Download the redist install.
    Not very intuitive, but you'll need to do this so you download the runtime and not the full version.
    Hope that saves you the 5 hours it took me to figure this darn thing out...I hate unintuitive products--they aren't very professional.
    +
    SAP, where do I send the bill for supporting your own product?
    I too have the same problem. Hopefully we can get a solution to this soon as the delayed release of the 2010 runtime has us in a difficult place.
    The problem: I upgraded my project to Visual Studio 2010; therefore, I upgraded to the Crystal Reports for Studio 2010 beta.
    Everything worked fine until I modified the app.config so that I could deploy the application into our test environment. We do not have Visual Studio installed in this environment, so we needed to have a Crystal Reports Runtime. According to the SAP website deployment guide, currently the only way to deploy a 2010 app is to use the 2008 runtime by modifying the app.config file to redirect the bindings.
    __Now, none of my date fields appear on the reports.__
    Just to test, in my development environment, I commented out the redirects in the app.config and the dates appeared. I uncommented the redirects so that the 2008 runtime would be used and then my dates disappeared from the report.
    Here is the entry I put into the app.config:
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Windows.Forms" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.2000.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.Framework" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="CrystalDecisions.Enterprise.InfoStore" publicKeyToken="692fbea5521e1304" />
            <bindingRedirect oldVersion="14.0.2000.0" newVersion="12.0.1100.0"/>
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    Your help is much appreciated.
    Thanks,
    Michael
    Edited by: SaganDraxan on Jul 16, 2010 8:23 PM

  • Filling an array from a field in the details section

    Hi.
    I'm a Crystal newbie. I'm using Crystal 11 Dev. I have some basic understanding of programming but I am clueless as to the organization and syntax used in Crystal scripts.
    Here's what I need to do. (I don't expect anyone to solve this for me, but just a starting point would be great.) I have a field in the details section, let's call it field-A. The details section is under group field, let's call it groupedField-A. For each groupedField-A there are zero to many field-A's which get looped through and displayed in the details section. Instead of just listing the values for field-A in the details section, I would like to display them in a string seperated by commas.
    I figure I need to create an new array for each new groupedField-A, then add the values from field-A to the array as the details section loops through them. Then, I figure I concatenate the array values into a string in the details section or maybe the group header or footer.
    Will this work in Crystal? If so, I need some help with the syntax. OR, is there another way to approach it?
    Any ideas would be greatly appreciated.
    Thanks
    Chuck W.

    hey Chuck,
    instead of using an array you may wish to use a string running total. an array is limited to 1000 values whereas a string running total is 64k.
    details section formula:
    whileprintingrecords;
    stringvar srt:= srt + + ",";
    group header section formula for reset:
    whileprintingrecords;
    stringvar srt:= "";
    group foot section formula for display:
    whileprintingrecords;
    stringvar srt;
    srt[1 to length(srt) - 1]
    hope this helps,
    jw

  • Fitting alot of fields in the details section [overflow]

    Hi,
    I am trying to create a simple report. I need to place 12 database fields on the report. These are going to go in the "details" section one beside the other. Unfortunately, I have run out of space in the details section and am left with 3 database fields not on the report. Is there a way in which i can fit these fields on the report?
    thanks
    J

    Hi James,
    You may increase the page size by going to File>>Page Setup and select landscape as orientation.
    Another option is to connect to a plotter (printer) which is known to have wide page sizes
    Thanks

  • Can Grow Vertical Alignment Error in Embedded Report View, but not in .PDF

    Hello,
    I have seen postings about this issue before, but have yet to find a solution. 
    I am using Visual Studio 2008 w/ the basic version of Crystal Reports that is included.
    I have a simple report that displays results of a stored procedure as rows across the report.  One field can be of variable length, anywhere from 0 to 100 characters.  Usually it's something reasonable (less than 40 chars), and so I have only given it so much width in the report.  For when it is longer than that, I turned the "Can Grow" property ON, and set the Maximum Number of Lines property to 0. 
    When the report displays embedded in my Web Form, and this field's data is wider than the space I have allowed, it breaks the data down into multiple lines of the same correct width, as you'd expect, but those lines end up displaced vertically upward several rows, and print directly on top of other data from the above rows, make the report unreadable in that area (and quite ugly overall!).
    If I export this report to a .PDF, it displays perfectly, without the vertical displacement error.
    Anyone know what the official work is on this?  Is there a fix or is this a bug?
    If there is no fix, does anyone know how to direct the report to the .PDF file viewer, so the embedded report remains invisible (and thus hides the ugly error), but the user has the .PDF version to see?  My client ultimately wants to export the report to .PDF, which I have already coded, but it does not open the .PDF Viewer, just saves the report to disk.  However, if I use the Crystal built-in Export button, it first displays a pop-up asking which format to export to, then if .PDF is chosen and okay is clicked, the pop-up switches to contain the .PDF Viewer, and opens the report.  In my user-defined export code, the .PDF is correctly created, but I am missing the step on how to open the .PDF Viewer.
    Any ideas?

    Thanks for the responses.
    Jonathan, moving the field in question to its own details section (details B) did not fix the issue.  The field in question is moved slightly down as its in a new details section with sits slightly lower than details A, but when it has to be broken up into multiple lines, the same issue arises, the field text is displaced vertically upward and sits on top of other data.
    Ludek, I wanted to send the report to a .PDF Viewer in a new browser, and keep the original browser intact.  I'm using code very similar to yours.  To launch the new broswer I added this code to the Page_Load of my main browser:
    btnViewReport.Attributes.Add("onclick", "window.open(Page.aspx', """", """", 'height=200,width=400')")
    When the button is clicked the report is exported, and the new browser opens Page.aspx.
    I use this code in Page_Load of Page.aspx:
            Dim webClient As System.Net.WebClient = New System.Net.WebClient()
            Dim buffer As Byte() = webClient.DownloadData("C:\Reports\Report.pdf")
            If Not buffer.Length.Equals(0) Then
                Response.ContentType = "application/pdf"
                Response.AddHeader("content-length", buffer.Length.ToString())
                Response.BinaryWrite(buffer)
            End If
    Any other ideas on the original vertical displacement issue when using Can Grow, I'd still appreciate it.
    Thanks,
    Scott
    Edited by: Scott Deltorto on Sep 23, 2008 10:15 PM

  • Blank space between Detail section and Page Footer - How to remove it ?

    below is the problem.
    We make  report as followspage header Section details
    Employee Information    
    Report Footer
    Page Footer                   
    Other Information
    whenever we run this crystal report it leaves space in between  after employee information (Detail Section) and before Page Footer.We don't know its a problem  of footer or any other else.
    When i preview and print out the reports
    it showing Detail section 10 Rows (which satisfying condition) and then Blank space and then at the bottom of page shows Page Footer (which contain 2 subreports).
    Let me know if you need aditional information on this.
    pls provide suggestions.

    Try with this
    1. Suppress any unused sections in both sureports and in the mainreport.
    2. Check all the fields fits the sections. Select all the fields in the section and give align top and make all the fields of same height and make it fit to the section.
    Hope this solves your problem.

  • Details section values

    Hi All,
    I have a field month in details section.Suppose if the month values are Jan ,Feb,Mar.Then in page header section (where I have all the headers)
    I have to show the same values horizontally.
    Is it possbile ? PFA
    Please help

    Hi Kalyan,
    Just place a crosstab on the report header and align it with the other column headings.
    The column of the crosstab would be the Month field with nothing in the Rows and Summary.
    -Abhilash

  • Edit box length size problem...at Detail Section.

    hi.
    Plz have a look on below image.
    This is my problem.
    in details section i put one edit box... like below..
    the data is comming from data base..
    Header 1
    but the size of the filed is more than the size of the Edit box..
    i all ready checked  can grow option in format field common properties.
    but horizontal line is not adjusting ....
    what should i do...

    Hi Srini,
    You can't place another object directly below an object that 'grows'.
    Create another section and move the line to this new section.
    -Abhilash

  • How to combine multiple Details section rows in my report

    Hello,
    I am currently creating a report which will display employee details, which includes first name, last name, home phone, cell phone and Email.
    I get my First Name and Last name from the "Employees" table but all other info is situated in the "CommunicationLinks" table.
    The tricky part which I am having issues with is the Home Phone, Cell Phone and Email are all under the same field in this table, the field is called "DisplayAs".
    These 2 tables are linked together by taking Employees.LinkID and linking it to CommunicationLinks.LinkIDParent, which are matching linkids.
    The only issue that I have, is for example, if you look at the screenshot provided, I have 5 details section that gets populated for the same employee.
    How can I combine all these 5 records to only one?
    The homephone, cellphone and email field have formulas created for them, the formula is as follow.
    This example below is for the HomePhone field, the others have different type assigned to them
    If {CommunicationLinks.Type} =1 then
    {CommunicationLinks.DisplayAs}
    else ""
    Homephone, Cellphone and Email are all different types but uses the same field "DisplayAs".
    I also tried creating a subreport for each of these fields but seems to give me the same results.
    Any help would be really appreciated.
    If you have any other questions please let me know. See attached screenshots for reference.
    Thank you in advanced.
    Jocelyn

    Easier way without working in SQL:
    1.  Group by a field that is unique to the employee.
    2.  Suppress the employee group header and the details sections.
    3.  Create a couple of formulas:
    {@ClearVariables}
    WhilePrintingRecords;
    StringVar HomePhone := "";
    StringVar CellPhone :="";
    StringVar Email := "";
    Put this formula in the employee group header - even though the section is suppressed, it will evaluate.
    {@SetVariables}
    WhilePrintingRecords;
    StringVar HomePhone;
    StringVar CellPhone;
    StringVar Email;
    if {CommunicationLinks.Type} =1 then
      HomePhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for cell> then
      CellPhone := {CommunicationLinks.DisplayAs};
    else if {CommunicationLinks.Type} = <type for email> then
      Email := "";
    Put this formula in the details section - it will evaluate even though the section is suppressed.
    {@HomePhone}
    WhilePrintingRecords;
    StringVar HomePhone
    (Do the same for Cell Phone and Email.  Note that there is no semi-colon at the end of this one!)
    Put these formulas and all of the rest of the employee data in one or more Employee group footer sections.
    -Dell

  • How can I vertically align items that are in different regions

    Hello,
    I am a novice developer in APEX. I am creating a page which has 4 regions on it. Right now it looks like the following:
    ----region 1----------------------
    label: field label4: field
    -----region 2--- region 3--
    label: field label45: field
    -----region 4---------------------
    label:field [one-item-worth-of-space. next item aligned to right of item below]long_label: field
    label: field label: field
    I am trying to vertically align the items in these regions, in such a way that all the colons are vertically aligned.
    I am having a particular alignment problem in region 4, column 2 (item are bold). Both label:field, and long_label:field in region 4 have the same vertical/horizontal alignment option as the rest of the region (right for label, left for field). For some reason, there is one item space between these two items. This space is removed if I switch the two fields.
    I would really appreciate any help trying to understand
    - how to remove the one-item-equivalent space between two items in region 4
    - how to vertically align all these fields in different regions on one page.
    I tried to create the original scenario in bold, but the post would not allow space formatting. I apologise if it is difficult to understand
    Thank you in advance for your time.
    RHaq

    This is not the APEX forum. Post your question in this forum:
    Oracle Application Express (APEX)

Maybe you are looking for

  • Cannot recognize any internal hard drives, hard drives good

    Hi, My macbook pro 13" (bought in august 09) recently stopped being able to recognize its internal drive. I've run it through all sorts of diagnostic software, but none has been able to recognize it at all. I've tried swapping out the hard drive to o

  • I was informed i need to purchase standard 11 or standard 12 (?) in order to make word files converted from pdf editable. how do i do this?

    i was informed i need to purchase standard 11 or standard 12 from adobe in order to make files converted from pdf to word using the recently bought and installed adobe pdf exporter file. how/where do i do this?

  • WRT300N , WRT600n 20' MAX for a good signal!!

    Why are the new linksys routers so under powered you can only get a good signal level in the SAME room as the router? I pick up the nextdoor router twice as strong as my own that is only 5 foot away and thairs is over 150 foot away! I have spent Alot

  • Treo 750wx Camera Not Functioning

    I cannot get my camera to work anymore.  When I select the Camera icon it defaults to My Pictures directory, not to the camera.  Has anyone else had this happen to them? Post relates to: Treo 700wx (Sprint)

  • Workflow not saved

    Hi all, We experience the problem that workflows strangely won't be saved in the repository, hence when we open the workflow afterwards, we still have a blank sheet. But when we "save as" the file to another location, it contains the desired content.