Avoiding hard coding of Font and Signature Path in RTF

Hi All,
I have to create a check printing program and this requires MICR font and signatures. right now i have provided the URL for signature in RTF and path where my font is kept.
The issue is everytime i am migrating my code from one instance to other i have to change both. Is there any way so that i can avoid the hardcoding of both.
Thanks
Aryan

Hi Helios,
Thanks for the help buddy. I have gone through document earlier and here also the path hardcoding has been told. I want to avoid that.
Regarding the Image i am using a standard Report for getting the check details and i don;t want to modify that part for getting the url value from there. I hope there is some other way to resolve this the way oracle uses for it standard reports.
Thanks
Aryan

Similar Messages

  • In TOTALYTD function is it possible to avoid hard-coding year_end_date?

    Suppose you have a fiscal year of 9/30. The TOTALYTD function looks like:
      YTD Actual $:=TOTALYTD( [Actual $], 'Date'[Date], ALL('Date'), "9/30")
    But I want to avoid hard coding "9/30", and assuming I have a settings table from where I can get a date with the yearend, I tried this: 
      YTD Actual $:=TOTALYTD ([Actual $], 'Date'[Date], ALL('Date'), DISTINCT( 'Settings'[YearEndDate]))
    I get no errors but it calculates like "12/31". I tried to use Format but with no luck.
    Is there a way to make this work?

    I didn't try it, but I guess a max should work (assuming that there is only one date in the settings table).
    YTD Actual $:=TOTALYTD ([Actual $], 'Date'[Date], ALL('Date'), MAX( 'Settings'[YearEndDate])
    Can you try it out?
    Cheers,
    Jason | www.SqlJason.com
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

  • Tips on avoiding hard coded paths and make a java app platform independent

    HI all,
    I would like to gather some tips on how to avoid hard coded file paths, which are plenty in the application I work on and which I inherited from previous programmers.
    Also, when deploying to the production server, my app goes from a Windows platform to a Linux machine.
    I am curious to know what tricks and tools other programmers find useful in similar contexts.
    I am sure many of us would benefit from the discussion.
    Thank you !

    Actually, Java does this for you; you can use unix-style paths and they will still work, even on Windoze. To wit:
    public static void main(String[] args) {
            File f = new File("/");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\
    public static void main(String[] args) {
            File f = new File("/Program Files");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\Program Files

  • How to avoid hard coding in Programming

    Hi,
    For preparing a Sales report we need to fetch Excise, Tax and
    Education cess.
    While doing the programming condition types of excise, tax and education cess were given to technical consultants.
    It is like hard coding the programming. In future if a new condition type is created then it wont be calculated.
    What are the ways to avoid hard coding?
    regards,
    sathya

    You can create a Z-Table that you are using for referencing your data e.g. condition type. This way this is customizable.
    In a project I worked before we even had a more sophisticated way for avoiding hardcoding. We had one generic table including Program name, "Function to be exextued" (e.g. determination of condition) and the key value. And we had a function module reading these parameters from the gerneric table. Everytime you would need a specific value from this table you called this table via the function module.This way you had a customizable table and no more hardcoding was needed, the function module provided you with the values.

  • Parse schema name - Avoiding hard-coded schema names

    Hi all,
    I have been trying to find a similar thread but had no luck. I want to avoid hard-coding schema names in my reports. I have tried to use a Substitution string but I don't seem to be able to reference it by just doing :default_schema. I already reference the parsing schema like this: #OWNER# which is saving me a lot of time. Is there any way to create additional variables like that one instead of those substitution strings that can't be parsed in a query?
    Thanks a lot for your help.
    Regards,
    werot.

    Werot wrote:
    I have been trying to find a similar thread but had no luck. I want to avoid hard-coding schema names in my reports. I have tried to use a Substitution string but I don't seem to be able to reference it by just doing :default_schema. I already reference the parsing schema like this: #OWNER# which is saving me a lot of time. Is there any way to create additional variables like that one instead of those substitution strings that can't be parsed in a query?
    Will you actually get any benefit from using substitution strings? They are also hard-coded at design time. You could use application items if you need something dynamic.
    Bind variable syntax (:default_schema) will not work for lexical substitution of substitution string and application item values in report queries. You have to use static text (&DEFAULT_SCHEMA.) references (and be aware of the potential for SQL injection that this exposes).
    I wouldn't recommend using schema qualifiers directly in APEX applications. I would use grants, synonyms and views at the database level.

  • When Hard-coded server name and data base name are replaced with variables , execute process task does not produce the result

    Hi All,
    I am trying to load shape file into a sql spatial table. A execution process task is used to run the ogr2ogr.exe program.
    This is how the process tab looks like .
    Executable : C:\gdal_ogr2ogr\bin\gdal\apps\ogr2ogr.exe
    Argument :  -f MSSQLSpatial   MSSQL:server=SQL-ABC-DEV;database=MYSIMPLE_Dev;Trusted_Connection=True;\\mypath\files\shares\Data\www.mypage.htm\my_sample_file.shp
    Success value : 1
    For above settings, package runs fine. The spatial table is created in SQL server db. However when hard-coded SQL server name and database name are replaced with global variables , the spatial table is not created in the database. Yet the package runs fine.
    It does not throw any errors. (I am using another variable for full file path. It is not causing any errors though)
    " -f MSSQLSpatial   MSSQL:server="+@[$Project::SQLServerName]+";database="+ @[$Project::DatabaseName] +";Trusted_Connection=True;"+ @[User::Filepath] + "\\my_sample_file.shp"
    Both variables are string type. Can anyone tell me what I am doing wrong here please?
    I am running this in VS 2012.
    Thanks for your help in advance..
    shamen

    There should be a single space just after True:
    before
    " -f MSSQLSpatial   MSSQL:server="+@[$Project::SQLServerName]+";database="+ @[$Project::DatabaseName] +";Trusted_Connection=True;"+ @[User::Filepath] + "\\my_sample_file.shp"
    after keeping the space
    " -f MSSQLSpatial   MSSQL:server="+@[$Project::SQLServerName]+";database="+ @[$Project::DatabaseName] +";Trusted_Connection=True; "+ @[User::Filepath] + "\\my_sample_file.shp"
    Thanks
    shamen

  • How to avoid hard coding

    hello experts,
    in one of the requirements i asked to design the selection screen with some of the fields, those fields are having some constant values while filtering the data.
    to avoid that hard coding they asked me to design the selection screen with those fields can anyone suggest me how to do that...?
    thanks a lot for your anticipation...
    SRI

    hi
    good
    you can create a f4 search helo,store those hard coded values in a internal table and fetch those interal table value into that f4 help.
    thanks
    mrutyun^

  • How can I avoid hard-coding this where clause in the inner select?

    This is extremely fast, but I have to hard-code the inner-most where clause, and I obviously can't do that. I know how to work-around it by creating a function that takes the CUSTOMER_ID and returns the ORDER_ID from the most recent payment, and that's reasonably fast, but I thought it would be worthwhile to see if there was a way to do this in straight SQL. I also know that better design could make the problem go away.
    Very much appreciate it if you could take a look and let me know if there's any way to get this kind of performance without hard-coding.
    Thanks,
    create or replace view customer_view as
    select customer.customer_id,
              customer.customer_name,
                   select t.order_id
                        from (
                                  select payment.order_id
                                       from payment
                                       where payment.customer_id = 1 -- <-- Here's the line where I'm hard-coding the customer_id. Is there any way to reference the customer_id without hard-coding this?
                                       order by payment.payment_date desc
                             ) t
                        where rownum = 1
              ) as latest_order_id
         from customer
    select * from customer_view where customer_id = 1; <-- I want that inner-most select to use this customer_id, without having to hard-code it.

    Hi Matt,
    Something like this could be a possibility (Not tested)
    create or replace view customer_view as
      select customer.customer_id,
             customer.customer_name,
             (select min (t.order_id)
                       keep (dense_rank first order by payment.payment_date desc)
              from   payment
              where  payment.customer_id = customer.customer_id)
               as latest_order_id
      from   customer;Regards
    Peter

  • Is is possible to avoid hard-coding the Item in a shared Select List Query?

    I created a "Select List" in the Shared Components area as follows:
    My goal is to create a shared select list that can be used on any form for a particular Field.
    IF :P10_FK_RSTA_CODE is NULL THEN
    RETURN
              'select col_description, col_code_pk
              from CODE_TABLE
              where col_active_ind = ''Y''';
    ELSE
    RETURN
              'select col_description, col_code_pk
              from CODE_TABLE
              where col_code_pk = :P10_FK_RSTA_CODE';
    END IF
    Which works great, but how can I make the select list work for the same column on a different form?
    Because :P10_FK_RSTA_CODE is hard-coded in the function, I can't reuse this Function from a different form.
    (I could rename the Field on every form to the same name, but I'm hoping there is a better way.)
    Is there a way I can pass in a variable from the Field Item to make this dynamic where I can use it on any form?
    Also, I am very new at this, so if there is a better way to do this, I would greatly appreciate any input.
    Thanks in advance.
    MF

    >
    Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "956902".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I created a "Select List" in the Shared Components area as follows:
    My goal is to create a shared select list that can be used on any form for a particular Field.
    IF :P10_FK_RSTA_CODE is NULL THEN
    RETURN
              'select col_description, col_code_pk
              from CODE_TABLE
              where col_active_ind = ''Y''';
    ELSE
    RETURN
              'select col_description, col_code_pk
              from CODE_TABLE
              where col_code_pk = :P10_FK_RSTA_CODE';
    END IF
    Which works great, but how can I make the select list work for the same column on a different form?
    Because :P10_FK_RSTA_CODE is hard-coded in the function, I can't reuse this Function from a different form.
    (I could rename the Field on every form to the same name, but I'm hoping there is a better way.)
    Is there a way I can pass in a variable from the Field Item to make this dynamic where I can use it on any form?Reference the value of an application item rather than a page item in the LOV query, setting the value using a process or computation on each form page.

  • BufferedImage type parameter -- way to avoid hard-coding?

    My situation:
    I'm creating a new BufferedImage, then populating it with the Graphics of
    a component. I'm using the Component's height and width as two of
    the paramters, but I also need to specify the type. Right now I've got
    TYPE_INT_RGB hard-coded, but I seem to recall this is a Bad Idea.
    My question:
    Is there a (more) correct way to identify/specify the type when creating my
    BufferedImage?
    final BufferedImage myImage =
        new BufferedImage(myComponent.getWidth(), myComponent.getHeight(),
            BufferedImage.TYPE_INT_RGB);
    final Graphics2D g2d = myImage.createGraphics();
    myComponent.paint(g2d);

    Hm. I totally missed that method. Unfortunately, I really need a BufferedImage. I'm invoking ImageIO.write() later on, and that requires a RenderedImage, of which BufferedImage is the only implementation.
    Thanks, though. I'll definitely keep that method in mind for later!

  • Apple Mail color coding both font and background

    Is there a way to color-code both the font and the background of emails via Rules? As soon as you set a rule to color code one of them another becomes unavailable. This is probably by design but then I'd say this is very stupid design. I do not see any reason why both can not be set except that nobedy from Apple uses this feature .

    Before starting to complain, I have to admit that Mail.app made me switch from other rss and mail applications. It works well and I like having rss and mail in one program.
    But I totaly agree with you, I found this post by trying to find a fix for this ugly header. Also it's a mistery to me why the source name is the main title and the subject is the smaller sub title...
    And while I'm at it, just one more thing, this rss header or at least the title should be a link. So that if you want to open the selected post in your browser, you don't have to scroll down to the "read more" link.

  • How can I avoid hard coding this width?

    I have something like this:
    <s:SkinnableDataContainer
                                  width="200"
                                  itemRenderer="MyItemRenderer"
                                  dataProvider="{ dp }">
    If I have 4 items each 50px wide, I would set the width to 200px.
    However, I want to avoid hardcoding the width.
    How can I extract the width from the item renderer?

    You might want to try not setting a width and setting requestedColumnCount on the layout instead.
    <s:List>
        <s:layout>
            <s:HorizontalLayout requestedColumnCount="2" />
        </s:layout>
        <s:dataProvider>
            <s:ArrayList>
                <fx:String>0000</fx:String>
                <fx:String>1000</fx:String>
                <fx:String>2000</fx:String>
                <fx:String>3000</fx:String>
            </s:ArrayList>
        </s:dataProvider>
    </s:List>

  • Avoid hard coding

    This following section:
    boolean shownewUserLoc( JRTkNetworkInterface ajrtkNI ) throws LogicError {
             System.out.println( "####################################################" );
             System.out.println( "# Performing Action: Locations Screen (other User) #" );
             System.out.println( "####################################################" );
             System.out.println( "\t\t###################" );
             System.out.println( "\t\t# LOCATION SCREEN #" );
             System.out.println( "\t\t###################\n");
             System.out.println( "Available commands:");
             System.out.println( "\t\tSEARCH <User Name>");
             System.out.println( "\t\tNEXT or PREVIOUS");
             System.out.println( "\t\tCLOSE or CLEAR or NEW NAME or AGAIN");
             System.out.println( "\t\tSELECT\n\n\n");
             return true;occurs several times in my code, for every other boolean type, all this System.out.println stuff is repeated again. I'd say there is a way to in the above instead of all this System.out stuff refer to some txt file where all that is present, thus just let the contents of this txt be printed out?
    If so, how does this referring work?

    You could do it like this:
    class YourClass {
        boolean shownewUserLoc( JRTkNetworkInterface ajrtkNI ) throws LogicError {
            System.out.println(Finals.ERROR);
            return true;
    class Finals {
        public final static String ERROR =
                "####################################################\n"+
                "# Performing Action: Locations Screen (other User) #\n"+
                 "####################################################\n"+
        // other variables
    }, or use a properties file:
    http://java.sun.com/docs/books/tutorial/essential/environment/properties.html

  • How to get the name and the path of the font used in photoshop (not textItem.font)

    I'm trying to get the real name of the font and the path, is there a "easy" way to do it ?
    i need to get the font file (*.ttf or *.otf) and copy to the same directory as the psd file, that's why textItem.font doen't work for me.
    thanks in advance

    You could try this as it looks as if you are using Windows.
    Run the VBS script to create a fontlist file on the desktop.
    Then run the javaScript on the PSD document.
    It should copy the fonts to the same folder as the document, it will also create a text file with a list of fonts.
    It didn't find all the fonts in my test psd maybe because it wasn't in the windows/font folder?
    VBS.
    Set wshShell = WScript.CreateObject("WScript.Shell")
    Set wshSysEnv = wshShell.Environment("PROCESS")
    sMyFile = "c:" & wshSysEnv("HOMEPATH") & "\Desktop\Fontlist.txt"
    Dim objFileSystem, objOutputFile
    Dim strOutputFile
    Set objFileSystem = CreateObject("Scripting.fileSystemObject")
    Set objOutputFile = objFileSystem.CreateTextFile(sMyFile, TRUE)
    Dim str
    Const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
    objReg.EnumValues HKEY_LOCAL_MACHINE, _
    strKeyPath,arrEntryNames,arrEntryZZZ
    For Each entry in arrEntryNames
    str = wshshell.RegRead("HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts\" & entry)
           objOutputFile.WriteLine(entry & "," & str)
    Next
    objOutputFile.Close
    javaScript.
    #target photoshop;
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    try{
    var Path = activeDocument.path;
    }catch(e){
        alert("This document needs to be saved before running this script!");
        return;
    var FontFile = File(Folder.desktop + "/FontList.txt");
    if(!FontFile.exists){
        alert("You need to run the vbs script first to create the FontList file!");
        return;
    var FontList = new Array();
        FontFile.open('r') ;
    while(!FontFile.eof){  
       strInputLine =FontFile.readln();
       if (strInputLine.length > 3) inputArray  = strInputLine.split(",");
       if(inputArray.length == 2) FontList.push([[inputArray[0]],[inputArray[1]]]);
    FontFile.close();
    var PSDtextLayers = getNamesPlusIDs();
    PSDtextLayers = UniqueSortedList(PSDtextLayers);
    for(var a in PSDtextLayers){
        for(var f in FontList){
             var rex = new RegExp;
             rex = PSDtextLayers[a].toString();
            if(FontList[f][1].toString().match(rex,"i")){
                var From = new File("/c/windows/fonts/" + FontList[f][1].toString());
                var To = new File(Path + "/"+  FontList[f][1].toString());
                From.copy(To);
                break;
    var rFonts = new File(Path + "/required Fonts.txt");
    rFonts.open('w');
    rFonts.write(PSDtextLayers.join('\n'));
    rFonts.close();
    function UniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;for (var k in unduped) {
       uniques.push(unduped[k]);}
    return uniques;
    function getNamesPlusIDs(){
       var ref = new ActionReference();
       ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( 'NmbL' ));
       ref.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
       var count = executeActionGet(ref).getInteger(charIDToTypeID('NmbL')) +1;
       var Names=[];
    try{
        activeDocument.backgroundLayer;
    var i = 0; }catch(e){ var i = 1; };
       for(i;i<count;i++){
           if(i == 0) continue;
            ref = new ActionReference();
            ref.putIndex( charIDToTypeID( 'Lyr ' ), i );
            var desc = executeActionGet(ref);
            var layerName = desc.getString(charIDToTypeID( 'Nm  ' ));
            var Id = desc.getInteger(stringIDToTypeID( 'layerID' ));
            if(layerName.match(/^<\/Layer group/) ) continue;
            if (desc.hasKey(stringIDToTypeID('textKey'))){
                desc = desc.getObjectValue(stringIDToTypeID('textKey'));
                desc = desc.getList(stringIDToTypeID('textStyleRange')).getObjectValue(0).getObjectValue(stringIDToTypeID('textStyle'));
                var postScriptName = desc.getString( stringIDToTypeID('fontPostScriptName'));     
    Names.push(postScriptName);
    return Names;

  • How to get the table name in the trigger definition without hard coding.

    CREATE  TRIGGER db.mytablename
    AFTER UPDATE,INSERT
    AS
        INSERT INTO table1(col1)
        SELECT InsRec.col1   
        FROM
        INSERTED Ins
       --Below i am calling one sp for which i have to pass the table name
       EXEC myspname 'tablename'
      In the above trigger,presently i am hard coding the tablename
      but is it possible to get the table name dynamically on which the trigger is defined in order to avoid hard coding the table name

    I really liked your audit table concept.  You inspired me to modify it so that, the entire recordset gets captured and added a couple of other fields.  Wanted to share my end result.
    USE [YourDB]
    GO
    /****** Object: Trigger [dbo].[iudt_AutoAuditChanges] Script Date: 10/18/2013 12:49:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER TRIGGER [dbo].[iudt_AutoAuditChanges]
    ON [dbo].[YourTable]
    AFTER INSERT,DELETE,UPDATE
    AS
    BEGIN
    SET NOCOUNT ON;
    Declare @v_AuditID bigint
    IF OBJECT_ID('dbo.AutoAudit','U') IS NULL BEGIN
    CREATE TABLE [dbo].[AutoAudit]
    ( [AuditID] bigint identity,
    [AuditDate] DateTime,
    [AuditUserName] varchar(128),
    [TableName] varchar(128) NULL,
    [OldContent] XML NULL,
    [NewContent] XML NULL
    ALTER TABLE dbo.AutoAudit ADD CONSTRAINT
    PK_AutoAudit PRIMARY KEY CLUSTERED
    [AuditID]
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    CREATE NONCLUSTERED INDEX [idx_AutoAudit_TableName_AuditDate] ON [dbo].[AutoAudit]
    ( [TableName] ASC,
    [AuditDate] ASC
    )WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    END
    Select * Into #AuditDeleted from deleted
    Select * Into #AuditInserted from inserted
    While (Select COUNT(*) from #AuditDeleted) > 0 OR (Select COUNT(*) from #AuditInserted) > 0
    Begin
    INSERT INTO [dbo].[AutoAudit]
    ( [AuditDate], [AuditUserName], [TableName], [OldContent], [NewContent])
    SELECT
    GETDATE(),
    SUSER_NAME(),
    [TableName]=object_name([parent_obj]),
    [OldContent]=CAST((SELECT TOP 1 * FROM #AuditDeleted D FOR XML RAW) AS XML),
    [NewContent]=CAST((SELECT TOP 1 * FROM #AuditInserted I FOR XML RAW) AS XML)
    FROM sysobjects
    WHERE
    [xtype] = 'tr'
    and [name] = OBJECT_NAME(@@PROCID)
    Set @v_AuditID = SCOPE_IDENTITY()
    Delete from AutoAudit
    Where AuditID = @v_AuditID
    AND Convert(varchar(max),oldContent) = Convert(varchar(max),NewContent)
    Delete top(1) from #AuditDeleted
    Delete top(1) from #AuditInserted
    End
    END

Maybe you are looking for

  • HP printer 1512 series AIO does not turn on

    My HP 1512 series AIO printer has been working fine.  Today the printer will not turn on, any suggestions? Thank You

  • Strange spam situation.

    Starting a few days ago, I've been getting spammed a couple times a day. The weird thing is the "To:" field always reads something different (none of them being my e-mail address). Here are the ones I've gotten so far: [email protected] [email protec

  • Snippets not showing in Panel on Dreamweaver 8

    I have a user who had an issue with malware last week and I had to re-config his site settings. Now his snippets are not showing in the panel. The default built in snippets are there. I have another user who has only the custom snippets showing and I

  • Create a custom dock/application icon for .jar files built in eclipse

    I've spent the better part of the afternoon trying to figure out how to apply a custom icon to jar file that I created in eclipse. I am presently using eclipse v3.5 on Mac OS X 10.6.2 and have yet to find a way to change the java coffee cup logo in t

  • 2 Sales Order, 1 Delivery and 1 Invoice

    Dear All, Is it possible to configure 2 Sales Orders -> 1 Delivery -> 1 Invoice If so how do we do it. Kindly give inputs on the above issue. Thanks & Rgds Naveen