Set style for reports

Hello
i need to find a way to give a format to objects inside my reports, in a way similar to css.
Actually i export my reports in the code behind of my page, i wish to set the report sytle (font size and type, color, backgroung and so on). I've tried to use the setcssclass method in the code behind of the page that export the pdf without success :
the page:
<head id="Head1" runat="server">
<title></title>
<style type="text/css" runat="server" id="stile">
    h1
    background-color:Aqua;
    border-color:Black;
    color:Black;
    font-family:Arial;
    font-weight:bold;
    font-style:italic;
</style>
</head>
the code behind
report.SetCssClass(ObjectScope.PageHeaderSections,"h1")
Dim oStream As System.IO.MemoryStream
oStream = DirectCast(report.ExportToStream( _
CrystalDecisions.Shared.ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
I wish to remark i don't use crystalreportviewer and the above code print the file directly inside the browser.
the questions are:
1. does the above code should work and i'm doing something wrong or that approach is completly wrong and will never work? If it's a correct approach, why the stye doesn't get applied?
2. if that's not the rigth way to do this thing what tool should i use? formatting formulas? do them allow me to format large pieces of report at the same time like css do in html ? Can you provide me links to examples or tutorial.
i'd like to avoid to set font size,type , line thickness or colors for each item in the report, so any hint will be greatly appreciated
thank you in advance
Stefano

Hello, Stefano;
The code you are using is only formatting the HTML page and not affecting the report object.
To do that you would need to use the Crystal Reports SDK and that would include formatting options.
You are correct, you can use formatting formula for objects. You will want to test your results in the designer first. It will have to work the way you expect there.
You may be able to do create some generic formula that will work on larger groups.
e.g. @Format_Color
You could use this formula for lines and fonts that you needed the same color and at runtime pass in the color needed:
Report.DataDefinition.FormulaFields.Item("Format_Color").Text = crBlue
Then use this formula when formatting all the fields you where you want blue options for Font or Underlines as an example.
Another option is to actually add formatting at runtime using the Report Creation API properties of the Report Application Server SDK (RAS).
You can look for more ideas in the [Developer's Library|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm]. Look at "[New APIs for enhanced report customization|http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/rassdk_net_doc/doc/rassdk_net_doc/html/Whats_New_RAS2.html#1022964]".
Once the changes are made in the report object it should export to .pdf as you expect.
Elaine

Similar Messages

  • Correct way of setting styles for custom components

    Hey everyone,
                            I have a custom component which extends UIComponent and holds a image and a button. If I want to set the default style for my button where do I set it in the createChildren, stylesInitialized ,  updateDisplayList  or styleChanged ? I know styleChanged gets called first but the param is always null
    styleChanged = null
    stylesInitialized
    initialize
    createChildren
    initializationComplete
    commitProperties
    measure
    updateDisplayList
    Cheers,
    Firdosh

    Thanks for your recommendations. I have seen a lot of components (yahoo-astra e.g) call a static function or use Mixin (asfusion Rating Component)
    public class CustomComponent extends UIComponent {
              public static function initializeStyles():void
                   var styleDeclaration:CSSStyleDeclaration = StyleManager.getStyleDeclaration("BaseMultiFieldInput");
                   if(!styleDeclaration)
                        styleDeclaration = new CSSStyleDeclaration();
                   styleDeclaration.defaultFactory = function():void
                        this.backgroundColor = 0xffffff;
                        this.backgroundDisabledColor = 0xdddddd;
                        this.textAlign = TextFormatAlign.CENTER;
                        //other styles are based on the framework defaults
                   StyleManager.setStyleDeclaration("BaseMultiFieldInput", styleDeclaration, false);
              initializeStyles();
    is there a reasons why they are set in a static call?

  • Customize Styles for Report Wizard in Visual Studio 2013

    I'd like to customize the styles defined for the Reporting Wizard in Visual Studio 2013.
    There was a writeup for doing so that pointed to editing the following:  C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\en\StyleTemplates.xml
    However, there is no Business Intelligence Wizards folder under 12.0\Common7\IDE\PrivateAssemblies - yet when selected, the report wizard is picking up a list of styles from somewhere.
    Could someone point me to where the style definition is?
    Thanks in advance.
    Doug.

    Hi Doug,
    >>However, there is no Business Intelligence Wizards folder under 12.0\Common7\IDE\PrivateAssemblies - yet when selected, the report wizard is picking up a list of styles from somewhere.
    Just to make this issue clearly, whether this issue is related to the SSRS?
    Reference:
    http://forums.asp.net/t/2006554.aspx?How+to+make+Business+Intelligence+available+for+VS+2013+Express
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/7948fda2-c43b-48ad-8f4a-05fe0d528bf8/custom-styles-in-report-builder-20-table-or-matrix-wizard?forum=sqlreportingservices
    You said that it is related to the Business Intelligence, do you mean that you want to install the SSDT-BI?
    http://www.microsoft.com/en-hk/download/details.aspx?id=42313
    Like the second link in above references, if it is related to the SSRS, this forum would be better for you:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=sqlreportingservices
    If not, please feel free to let me know more information about this issue.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Cannot Set URL For Report Server SSL Binding In SSRS 2008R2

    Hi,
    I have an SSL certificate that has a number of subject alternate names and I need the SSL binding for the report server and the report manager to be against one of these names, not the certificate name.
    However, while it is possible to set the host header for a non-SSL identity and therefore control the URL reserved, it does not seem possible to set this for an SSL identity - the edit dialogue box simply generates the URL when you choose the certificate
    from the dropdown box.
    How do I set the URL for a report server SSL binding?
    Cheers
    Dan

    Hi Charlie,
    You are correct, i am configuring SSL connections on a native mode report server and i want to configure a custom URL for it.
    However, my issue is not that I cannot see the certficate - it is that I cannot set a custom URL for SSL connections. Apologies, I should have written up an example of what I am seeing:-
    I have installed a certificate for a.company.com. It shows up fine in the certificate list/dropdown for configuring the web service URL SSL certificate.
    I can set a host header for non-SSL traffic for a.company.com and the binding succeeds. I can also set an SSL identity in the same Advanced Multiple Web Site Configuration window for a.company.com and this also binds correctly.
    However, the certficate is like a wildcard in that it supports 4 more URLs in its subject alternate name property. I would like to set an SSL identity for b.company.com which is one of those entries.
    As an aside, the certificate is also installed in IIS and succeeds in binding to b.company.com. I mention this as it shows that the certificate appears to be installed correctly and is working in its wildcard-like capacity.
    I can also successfully set a host header for b.company.com for the report server for non-SSL traffic. It is b.company.com that I would like to host the report server and manager under.
    The issue I have is that if I try to add an SSL identity for the report server web service for b.company.com using the Advanced Multiple Web Site Configuration window, there is no editable box for URL and so it does not allow me to set the URL/host
    header - it therefore always binds to a.company.com.
    I have scoured the boards for answers and there have been a couple of mentions, but neither has worked for me.
    This one talks about adding the required
    https://b.company.com/reportserver to the rsreportserver.config file and the OP describes the issue pretty much exactly as I am experiencing plus the responder talks about this guidance as coming from MS support - however when I followed the steps the result
    is the same as without the configuration:-
    http://www.sql-server-performance.com/forum/threads/ssrs-2008-host-headers-and-ssl.28571/
    Another suggestion (for which I have lost the link) was to amend the URL config in that file directly and add the required entry. Both posters claim it has worked for them so I am sure that using a wildcard certificate with SSRS does work! I think in my
    case I am missing some extra steps as it is fine to amend the config file directly, but I don't think this actually kicks off the SSL/URL binding process which is what the dialogue window does.
    Hope this helps in explaining further. I am sure this is resolvable as I cannot believe the only option for SSRS is to bind to a single domain name and ignore the other wildcard/alternate options.
    Cheers
    Dan

  • Setting style  for DatagridColumn?

    My dataGrid has a style set for it in the CSS stylesheet. How
    can I change the style for one of the columns please?

    If your DataGridColumn has an id set for it, you can use the
    setStyle() method to set individual styles.
    <?xml version="1.0"?>
    <!-- dragdrop\SimpleDGToDG.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp();">
    <mx:Script>
    <![CDATA[
    private function initApp():void {
    greg.setStyle("backgroundColor","#ff00ff");
    srcgrid.dataProvider = [
    {Artist:'Carole King', Album:'Tapestry', Price:11.99},
    {Artist:'Paul Simon', Album:'Graceland', Price:10.99},
    {Artist:'Original Cast', Album:'Camelot', Price:12.99},
    {Artist:'The Beatles', Album:'The White Album', Price:11.99}
    ]]>
    </mx:Script>
    <mx:DataGrid id="srcgrid">
    <mx:columns>
    <mx:DataGridColumn id="greg" dataField="Artist"/>
    <mx:DataGridColumn dataField="Album"/>
    <mx:DataGridColumn dataField="Price"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • How to create the Set ID for report writer

    Hi
    I am suppose to create the Set id . Please suggest me the t-code etc for creating set id.
    Thanks
    Shiv

    transaction for  creating the set ID GS01
    further, the menu path  in the application menu is
    information system->Ad Hoc Reports ->Report Painter ->Report Writer ->Set
    if helpful, plz assign point as way of thanks

  • Enhancement request: modifiable style for report highlighting

    Dear Apex Developers,
    I have investigated the way highlighting is done in reports. What I found is, that a span container is put around the text to be highlighted with the style attributes colr:red; font-weight:bold;.
    The red characters do not fit with the template I am using right now and I would like to change this to another color. I have found a solution, which locates all the spans within a page which have those particular style settings, but this doesnot function well with PPR.
    Anyway Javascript is not my favorite tool to solve these kind of problems, certainly not when the solution can be very simple.
    I would propose to use a class in Apex to highlight the matches with the search item. That way the class can be redefined using regular CSS mechanisms and no Javascript is needed.
    How about it? An enhancement for Apex 4.0? I would like so!
    greetings,
    Dirk Dral

    Hello Saleem,
    Almost all fields required for VAT reporting are available in standard tax report
    S_ALR_87012357 .
    You have to configure the layout from the selection screen as below
    regards
    pb

  • Setting style for html tags in flex

    I need to add display:inline style property to <p>tag in flex CSS. Is there anyway to do like the below in flex
    p{ display:inline}
    Thanks in advance.

    Hi rizmysl,
    You cannot directly set the backgroundColor to a Label control however you can do it by getting a reference to the underlying TextField control inside the Label, for that you need to write some actionscript.
    Check out the below code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
         <mx:Style>
              .texfield{ width:300; height:30; background-color:red; fontWeight:bold;}
         </mx:Style>
         <mx:Script>
          <![CDATA[
           import mx.core.IUITextField;
           private function init():void
            //Getting reference to the underlying TextFiled control inside Label
            var tf:IUITextField = (myTextField.mx_internal::getTextField());
            tf.background = true;
            tf.backgroundColor = 0XFF0000;
            tf.width = 300;
            tf.height = 30;
          ]]>
         </mx:Script>
         <mx:Label x="25" y="113" text="My Sample Text Goes Here ...."  styleName="texfield" id="myTextField" />
    </mx:Application>
    Thanks,
    Bhasker Chari    

  • Setting Margins for report

    Hi
    i have report that prints from a TAG-Printer (small receipt printer). every time i set its paper size (2.5'-1.5' ---selected from List) before printing it i want to hardcode its paper size and when i press button from form it don't ask any thing and prints the report with hard coded paper size.
    how is it possible.
    Najeeb.
    null

    hi,
    You have to see the size of the report u r giving. It depends upon the thing that how mucg width and height u r taking if the main frame where you reapating frames are kept. You send me the rdf then I may give you more suggestions.
    Bye
    Ashu

  • EBusiness tax feature "Tax for Reporting Purposes Only"

    Hi everyone,
    Did anyone used "Set Tax for Reporting Purposes Only" feature in Etax? If yes, then can you, please, describe me how works in AP/AR modules. Because for some reasons I cannot make it work and Etax User Guide does not contain much information about it.
    Thanks in advance,
    Vladimir

    As I mentioned in the PM, I'm going to list an alternate tax solution here.
    It involves using a single tax amount (the lower amount) on all products. That may not sound right, but with some additional steps it's not a bad solution.
    Assuming you have two tax amounts, one at 7.5% and another at 9%, you assign all taxable products the lower tax amount.
    Then you change the price of the higher taxed products by the difference in the percentage. (if the product was $1, then it is now $1.02) Part of why this works is because the increase is not so significant that customers would usually care.
    Using the product attributes, you set up a dropdown list with the options, "tax1" and "tax2"
    Each product, in a custom1 field is assigned its appropriate tax name (tax1 or tax2).
    The dropdown list is hidden, so the customer doesn't know it's there
    When a customer looks at a large product view, js automatically selects the appropriate attribute based on what is in the custom field.
    Set up two reports, one for each tax group.
    Filter them by attribute, so only the applicable products are shown in the report
    Using very simple math (Total x 1.075 and Total x 1.09, depending on which report it is), the accountant will know exactly how much to pay in taxes for each tax type.
    At first glance, this looks like a bad solution, but all that really matters is that the company is collecting and paying their taxes. Your client charges the lower amount so they are not overcharging taxes (kind of illegal). The slight price increase of the higher taxed products covers the rest and then some.

  • I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    Close ... before going for a specific Cisco app ... lets find out some details:
    Host we need more details:
    What is your server environment (Windows Server, or Mac OS X Server, or Linux)?
    What security is implemented in your environment - as what is restricted (RDP for all or specifc credentials on all machines? Are you part of local admin group to the server you wish to connect)?
    Does your environment Support CISCO IPSec connection? If so use Settings> VPN and IPSec tab to enter VPN details, if not then go with above suggestion. IF your restricted to RSA then either built in VPN settings or 3rd party app for RSA would suffice.
    Finally, there are many RDP applications out there I use "Mocha RDP Light" (free minimal ads when launched not when connecting).

  • How to dynamically set connection string for report in C# code?

    Hi,
    I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
    Is this possible?
    Thanks
    Ivana

    Lots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Set headers for drill-down reports.

    Hi!!!
    The problem we have by now is when printing a report, selected characteristis are showed in header as "multiple values" instead of showing the real values that user have choose.
    Does anybody knows how to set headers for drill-down reports in order to see selected characteristics?
    Thanks in advance...
    Adela Cambiasso.

    Sorry, me again...
    I have found yet they way to show in the header the report parameters, I mean, the selection criterias that user used when execute the report... I was able to show selected characteristics inside de report but not the selection criteria...
    Do you know what I have lost? or what to use for this?
    Thanks again.
    Adela.

  • New set for Report Writer

    Hello,
    I am new to the Report Writer.  My understanding is that Report Writer makes use of pre-defined sets of financial objects.  My user wants to create new report group in Report Writer and add some new data which are currently in Z-table. Is this possible? Do we create a new set based on Z-table and then incorporate it in the new report?
    Please advise,
    Thanks
    Galina

    Hi Galina,
    No were SAP released document Z tables is support for report writer.
    moreever SAP recomonded to create reports by using report writer / painter for specific Tables only not for all standared tables.
    as i know not possible to use Z tables for report writer.
    still your business want A table data report, you can able to develop through ABAPer help.
    Refer: http://www.virtuosollc.com/PDF/Get_Reporter.pdf
    Regards,
    Viswa

  • Set default style for shapes

    Is there a way to set a default style for Shapes in Pages 5.2 ? 

    Accidentally discovered th answer to this (tried to delete the question but could not).... seems that if rearrange the "styles" in the format side bar, the first style will be the default style used....

Maybe you are looking for

  • How to add text to photos?

    Please advise how I add text to pictures.

  • Blue & White G3 upgrade to G4?

    Hello - I have an old G3 Blue/white which I would like to use to run a slideshow in my gallery. How do I upgrade this machine to achieve this? I don't need to use the machine for anything beyond running a slideshow through an LCD projector. Thanks.

  • How to create a new system folder?

    When click on the Browse Conent, how to create the top-level folders like 'Contribution Folder' in UCM11g? Thanks for your help.

  • Blackberry 8520 setting up an email address

    I am a very new purchaser of this Blackberry. Most things seem to be working just fine. I have successfully set up my AOL email address so I am receiving AOL emails on the Blackberry. I also have my own domain name for use on my PC. I have tried addi

  • How to upgrade to latest version on Ubuntu 10.10 LTSP server

    I run Ubuntu 10.10 LTSP server/client network and DO NOT want to upgrade Ubuntu... too much trouble, nobody can guarantee it will not hammer my LTSP install and besides, Unity is awful. I need newer Firefox due to some frequently used web pages, so I