Need help with adding formatted text and images to Crystal Report?

Here's my scenario:
I have a customer statement that's generated as a crystal report and that has a placeholder for advertisement. The advertisement is mixture of formatted text and images. Until now we only had one advertisement that was always used on the report. The new requirement is that we would have a pool of hundreds of advertisements and would need to display one specific advertisement on the customer statement based on various marketing criteria. They key is that the advertisement content will be determined programmatically and cannot be hardcoded into the report. I'm using Crystal2008 with .net SDK.
Here are the solutions I thought of, but I'm still rather lost and would appreciate your help/opinion.
1) Pass HTML or RTF to the report
Not really sure if this is possible and how to get it done. Also how would I pass in images? Would display formatting be reliable when exporting to PDF?
2) Create each add as a subreport and append it programatically
I actually have this working, but I only know how to append a new section to the end of the report and then load the subreport to the section. I have no other controll of the placement. Is there a way to dynamically load a subreport to a predefined section in the main report? How about adding a dummy subreport in the main report as a placeholder and then replacing it with a different subreport? How could I do this?
3) Pass an Image to the report
I would create each advertisement as an image and then would somehow add the image to the report. How would I load the image and control the placement? Could I somehow define a placeholder for the image in the main report-maybe a dummy image to be replaced?
Thank you.

Hello Pavel,
I would got the third way.
You can use dynamic images in your report.
Just by changing the URL to the image the image can be changed.
Please see the [Crystal Manual|http://help.sap.com/businessobject/product_guides/cr2008/en/xir3_cr_usergde_en.pdf] and search for images.
or directly here
[Setting a Dynamic Graphic Location Path on an Image Object|https://boc.sdn.sap.com/node/506]
[Dynamic image and HTTP://|https://boc.sdn.sap.com/node/3646]
[codesample for .NET|https://boc.sdn.sap.com/node/6000]
Please also use
[Crystal Reports 2008 SDK Documentation and Sample Code|https://boc.sdn.sap.com/developer/library/CR2008SDK]
[Crystal Reports 2008 .NET SDK Tutorial Samples|https://boc.sdn.sap.com/node/6203]
Hope this helps
Falk

Similar Messages

  • Need help with adding lightbox feature to images pulled from .js

    Hello,
    I've been attempting to add a lightbox to separate images (no group) in a responsive one page portfolio template. Unfortunately I'm not savy with this topic.
    The template came with a hover action to apply what I would believe to be a light box image but no other documentation on how to add it to the images. I've looked everywhere.
    The portfolio gallery is built in .js Here is some code The image code you see is just copied over and over to add images.
    BTW - Lightbox mxp only allows you to add to an image when clicked on in the properties. These images are pulled from .js
    Here is a link to the site:
    http://wswdesign.com
    Please help!
    <ul class="portfoliofilter">
      <li class="filter active" data-filter="design branding media web">All</li>
          <li class="filter" data-filter="design">PRINT Design</li>
          <li class="filter" data-filter="branding">Branding</li>
          <li class="filter" data-filter="media">Digital Media</li>
          <li class="filter" data-filter="web">WEB DESIGN</li>
      <ul class="portfolio">
      <li class="item design">
      <div class="portfolioitem">
      <img src="img/print1.jpg">
      <div class="portfoliohover">
      <div class="info">
      <h1>+</h1>
      <h5>trade show graphics</h5>
      <h6><b class="light-gray">Celguard / Membrana</b></h6>
      </div>
      </div>
      </div>
      </li>

    You might want to correct your HTML errors first.
    [Invalid] Markup Validation of http://wswdesign.com/ - W3C Markup Validator
    Your document contains links to jQuery scripts.  But I don't see any lightbox in there.  It appears to be using jQuery's core library as well as  scripts for carousel and scrolling/show & hide features.
    Nancy O.

  • Need help with adding emoji to my hubby's phone don't see it when I click on the keyboard tab

    I need help with adding emoji to my hubby's iPhone when I go to settings then the keyboard tab it's not there

    I did that bad it's not there and doesn't give me to option to click on it

  • Need help with my iPhone 5 and my Macbook Pro.

    Need help with my iPhone 5 and my Macbook Pro.  I was purchased some music on itunes at my mac. Some reason I deleted those music from both on Mac and iPhone 5.  Today, I went to my iPhone iTunes store inside of iCloud to redownload my puchased. But those song won't able to sync back to my iTunes library on my Mac.  Can anyone help me with that ??....
    iPhone 5, iOS 6.0.1

    You've posted to the iTunes Match forum, which your question does not appear to be related to. You'll get better support responses by posting to either the iTunes for Mac or iTunes for Windows forum. Which ever is more appropriate for your situation.

  • Need help with buying graphics card and ram for MSI 865PE NEO 2-V

    Hi,
    I want to buy 1GB of ram for motherboard MSI 865PE NEO 2-V I need help with finding correct parts.
    I also want to buy 512Mb or 1GB graphics card.
    as i said before i need help with finding correct ones so they match motherboard, I would appreciate if any one would post link to cheap and fitting parts.
    I found graphics card allready, i just need to know if it will fit.
    the card is
    NVIDIA GeForce 7600 GS (512 MB) AGP Graphics Card
    Thanks for help.

    here you can see test reports for your mobo:
    http://www.msi.com/product/mb/865PE-Neo2-V.html#?div=TestReport

  • Need help with clickbios ii terminolgy and values. Z77A-GD65 / 3770k

    Hello All 
    I recently purchased a Z77A-GD65 board and after searching I've found the differences in terminology between this and my previous Asus board but still have a couple of settings I cant find any info on.
    System Specs:
    motherboard: msi z77a-gd65
    cpu: intel 3770k
    ram: corsair vengeance 2133mhz 1.5v
    psu: corsair 850w
    First things first is I believe I am running in turbo oc mode. I've selected the oc genie tab on the center right of the bios screen and proceeded to change settings there. With cpu voltage on auto and vdroop set to 50% at 4.6ghz. (I'll try and get screenshots of bios settings soon)
    The following are the terms I need help with:
    In the my oc genie section;
     1. Long duration power limit
     2. Long duration maintained
     3. Short duration power limit
    In the main overclocking section;
     4. Digital Compensation level (not in owners manual, options auto/high)
     5. Cpu core ocp expander (enabled for overclock 4.5ghz+?)
    In the CPU Features section;
     6. long duration power limit w (does "w" stand for watts?)
     7. long duration maintained s   (does "s" stand for seconds?)
     8. short duration power limit
     9. primary plane current limit a  (does "a" stand for amps?)
    10. secondary plane current limit
    11. primary plane turbo power limit
    12. secondary plane turbo power
    I know those are a lot of settings, but would appreciate any simple definitions as to what they do and recommended values for mild overclocking (4.5-4.80)
    Also on my previous board (Asus P8P67 Pro) my 3770k was stable in prime95 for 18 hrs at 4.5ghz fixed 1.155v with only ram timings put in manually and LLC set to extreme.(or whatever max is called in asus bios) Voltage was fixed and everything else was defailts.

    Well I'm back.  Been digging around for a few days and found some answers to my questions.
    First things first s that for some reason I could not adjust voltage values with the + or - symbols. Clearing cmos did not help this. I had to reflash the bios to get this functionality back as well as clearing cmos before and after the flash.
    So I figured out the values in the oc genie section are the same as the normal section but only used when your using the oc genie. (numbers 1-3)
    Digital compensation level and ocp expander should be set to high and enabled respectively when going for higher overclocks. (4 and 5)
    Now for the rest of my questions ( 6 through 12) I have found suggested settings and some info after hours and hours of searching but still have a couple of questions about them.
    Long/short duration power limit, and primary/secondary plane turbo limit. I see suggestion settings of 250 or 255. I take it this is simply max supplied watts to the chip? If so why the 250/255 values? Is that the highest the board will give? Is plane turbo limit related to the enhanced turbo stated and how much wattage can be drawn there while the other limit is for any non turbo frequencies?
    Long duration maintained, I've seen 60 suggested a lot. Why is this?
    There's not an over abundance of info on these boards as compared to asus so it seems info is a little less documented and video tutorials explaining things are next to none.
    Any help would be appreciated. Thanks 

  • I need help with my wifi text. I can't use them

    I need help with my iPhone 4. I can't text since. I get wifi in my house ?

    What is the make & model of the wireless router that you are trying to extend with the WN3000RP? Can any other wireless clients connect to the extended network, just not your iMac?

  • HT4528 I need help with my I phone and I can get verizon to let me on there to talk and I will have to have my phone so that I can do what you tell me to do

    I need help with my phone it is not ringing and I cant figure where in here to make it so it will something has been pushed so I cant hear any calls or texts

    Not when you insist on being so impatient.
    These are user to user support forums.  No one here is paid to read or respond to messages.
    Try explaining the issue instead of the jumbled, rambling mess of a title and we will be happy to assist.

  • Need help with adding images option

    I was using the add images option a few weeks ago just fine.. using my tablet and uploading the images via usb. then all of the sudden it stopped working.
    please help with this issue.
    Danny

    A few questions. What result are you experiencing? Did PS Touch crash? Have you tried to force quit-and restart PS Touch? -Guido

  • Need Help with External Hard drives and too much music

    I am not terribly tech-savvy, and I need your help. I have a G5 PPC dual processor with an internal 250GB drive. I have two seagate firewire/USB2 external hard drives. One is 250GB and one is 350GB. I want to know how to use them to get my Mac to run faster and better.
    My original hard drive is 7GB shy of being full. Almost half of this is my itunes library which is over 100GB. The older (250GB) hard drive has about 150GB of photos/videos.
    My Mac is running slow as molasses and when I power up the external hard drives it slows down to what I recall my original Mac Plus ran like.
    I use the G5 primarily to work with photos, illustrations and creating the occasional DVD with video and photos. the apps I use most often are Photoshop, Illustrator and Painter. I always listen to music while work.
    I hope all of this information is helpful! Here is my question:
    What is the best way for me to set up and use these external hard drives to return my G5 to its original blazing (to me) fast speed?
    PPC G5 Mac OS X (10.4.9)

    I think you should look at adding two 500GB internal drives. I'd say Maxtor MaxLine Pro for cost, but they also run much warmer (43ºC even when nearly doing zilch) so I'd go with WD RE2 500GB for $40 ea. more.
    dump whatever you don't need, trash anything that is hogging space and is just temp file or useless cache. Web browsers can leave behind a ton of small files eating up tens of MBs.
    Use SuperDuper to backup/clone your drive.
    Disk Warrior 4 to repair (after it gets to 15% free, or just forget for now).
    A 250GB drive formats to 240GB and you have ~3% free it looks like.
    For every data drive plan to have two backup drives.
    Keep your boot drive to 40% used.
    And your data drive to 60%.
    Backups can go a little higher.
    Drives are cheap and inexpensive, especially for the space and performance. And they have improved SATA over the years it has been out.
    By doing a backup followed by erasing your drive, and then restoring it, using SuperDuper, which optimizes the organization, skips copying temp files that aren't needed, it also defragments your files. I would do backup daily to different sets that you "rotate." And before any OS update. And do the erase and restore probably every 2 months.
    Make sure you keep one drive partition somewhere that is just your disk utility emergency boot drive that is not a copy of working system, used for doing repairs like running Disk Warrior and Disk Utility.
    You may need to repair; backup; even erase and restore your external drives. Rather than spend on vendor made case, just pick up a good FireWire case either with drive, or bare (and add your own). I think it'd add 500GB FW drive though.
    Why?
    To begin backup of your current drive. To leave your other FW drives "as is" for now.
    Then install a new internal 500GB drive as well so you now have a good current backup, and you have moved your data off 250GB to 500GB. If anything happens, you have one off line FW backup.
    Then begin to clean up, organize, and get your FW drives working. It sure sounds like they have had some directory or file problems.
    You can find a lot of Firewire and SATA drive choices over at OWC:
    http://www.macsales.com/firewire/

  • Need help with ext. SWF and XML

    I'm trying to create an External SWF to load into my main
    site (photography).
    Home | Portfolio | Published Work | Bio | Contact
    The SWF I want to load externally is Portfolio because it has
    5 sections
    Those 5 sections are:
    -Editorial
    -Adventure
    -Fly Fishing
    -Multimedia
    -Weddings
    I'm looking to keep this dynamic as possible, but I'm one of
    those guys who doesn't write code from scratch, but knows AS well
    enough to modify a base or a generic template if ever given. It
    would be easier to use one subsection as an example, which could be
    applied to all others.
    e.g. "Fly Fishing" 1-Main container; 5-10 thumbnails (1
    dyanamic thumbnailcontainer)
    - I don't know XML (but can modify it). basically having an
    ID tag for each image, possibly dynamically generate a thumbnail
    too. Also have a spot for dynamic text to load in (captions with
    multiple text lines for images upon onRelease - maybe this could be
    it's own MC that loads on top of the main photo container)
    - on (release) on a thumbnail: there would be a little
    information icon that would appear. If you mouse over, it would
    overlay a layer over that specific ID photo, and the text appear.
    RollOut it would fade out the layer above that specific ID photo.
    - Transition: FadeOut/Blur/Exposure Blur, something
    interesting to that nature.
    - Thumbnails: is it just easier to create thumbnail images
    manually, and just create a separate container?
    - Image folders: I would imagine each section would have
    it's own watch folder. For example "Fly Fishing" would be a folder
    "/swfImg_flyFishing/", but perhaps having one XML file.
    - XML file details
    id
    location
    caption summary
    title
    As you can see, if I had one template to build off of, I
    could repeat it self for the others. I need help and if there is a
    flash component (free or purchase) that does at least 70% of what I
    need, please share information. thank you!Portfolio

    I know doing a pushback to the client requires Flex Data
    Services, but since I don't use FDS I can't tell you exactly how.
    But look in the documentation about "pushing" data to the client.
    Once you've figured out how to do that, you can trigger that push
    once you've finished editing the xml file. You may want to ask over
    in the FDS forum.

  • I need help with adding fire to an existing picture in elements 8

    I'm a painting contractor and I'm trying to create a new picture for my buisness cards and tee shirts. What I want to do is put flames coming from a brush and work pot that I'm holding in my hands. I've looked everywhere on line, but I can't find exactly what I want. I'm hoping that someone in this forum will be able to help me. Thanks.

    Okay, I have been playing with for a few days. Warning, this is going to be loooong. I do this differently in Photoshop but couldn't get it to work with the elements workset as it doesn't have the curves tool that Photoshop has so I had to find an alternate method to pump up the flames. Luckily, I ran into a video that used a method other than curves to get me on track. I assumed you want realistic flames...so I was pushing for how real could I make flames using paint and blend mode operations.
    Edit: I should let you know that you can try to extract flames from other photos and composite them into your photo. First, need a good fire image. It works best if you can find a fire with a black background. Screen blend mode will drop out black. Try working with two copies of the image. Turn off the topmost copy of the flames. Leave the bottom flames in Normal blend mode. Mask or erase the outer edges of the flames with a soft brush so that only the interior of the flames are visible. Now, turn on the topmost version of the flames. Leave the topmost version of the intact...don't mask or erase anything. Change this topmost flame layer's blend mode to screen blend mode. If you see any problems with your flames, you can erase or mask any defects. You can duplicate the screen layer to brighten the effect. Use opacity to control the volume. This would be the easiest solution but you'll have to find some flames that trip your fancy. I haven't tried this out yet so can't say how much better or worse it would be than using a good set of flame brushes along with some blend mode tricks.
    Below shows how close I can get using paint. I only used options available in PSE. I used layer masks that if you had PSE 9 would be native. Since you have PSE 8, you'll need to either download an install an add on that adds the basic layer mask function or use clipping masking.
    Below is a link to a freeware set that includes layer masks. Install instructions are on that site.
    http://www.cavesofice.org/~grant/Challenge/Tools/Files.html
    If you want to go the clipping mask route, have a look at this tutorial:
    http://www.photokaboom.com/photography/learn/Photoshop_Elements/layers/layer_groups_clippi ng_masks/1_layer_groups_clipping_masks.htm
    Before and After the effect.
    I would have posted sooner but had to find a workable solution to making the flames look realistic in Elements as I can’t use the curves tool as it isn’t native to Elements.
    With the help of this YouTube video I came up with something…
    http://www.youtube.com/watch?v=cOIBkWvHOqk&feature=related
    I based this tutorial on the hue/sat numbers, blend modes, and blurs.
    First, I downloaded a flame brush set. This set in specific:
    http://luexo.deviantart.com/art/Scorching-Flames-Brushpack-92945924
    The above set is really nicely done and  has large high resolution brushes.
    One thing I do not agree with in the video is the color used. White is hard to change in the Hue/Saturation dialog. Instead I use 50% gray as my paint color. This is easy to set…either use the 50% color swatch or open the Color Picker and set H to 0, S to 0, and B to 50...hex number is 808080.
    Things to keep in mind include fire is gaseous, bright and the way it burns…it one direction, fire reflects and there is probably going to be some smoke.
    In my example, I am going to set a  lunch cake. Nice 4th of July theme. J
    Let’s start my scorching the item that will be burned. In this case the lunch cake will be scorched.
    Scorch the item…preparing to light it up.
    1. Duplicate image and put image into Linear burn blend mode; opacity 100%. Add layer mask or erase everything but the item to be scorched…the lunch cake.
    2. Duplicate layer you just made in step #1. Change the blend mode to Multiply 100%. Desaturate this layer.  Image Adjustments<Hue/Saturation…move Master Saturation slider to  -100. Take burn tool set to Range: Midtones; Exposure 35%; air brush on…and scorch the item. Make it kind of smudgy. You don’t want an even coat. Make it darker as you get closer to the flames.
    Note: Here I’ve jumped ahead. I already know where my flames are going to be. Either visualize where you want your flames or jump ahead and laid down the basic paint and transform into the correct position. Turn off flame layer (s) when done. So step #3 if you do any repair work isn’t affected.
    3. If you feel you need to do any clone repairs, create a composite image ctrl + shift + alt + e if on PC…cmd + shift + opt + e if on a Mac. Do the clone work on a blank layer over this. With clone tool selected, check the box in the options bar that says something like “All Layers”, “Use All Layers”, “Sample All Layers”…the box says one of those things beside it. I can’t recall which and not sure if it’s consistent between all versions of Elements.  Anyway, Leave layer in Normal blend mode 100% and likewise leave tool in Normal blend mode…opacity to taste. Fix any defects on this layer. You can do the same thing with the healing brush if you need to do any healing. I find it best to heal to a separate layer and not mix and match the healing tool and  clone stamp on the same layer.
    4. Turn off or trash the Clone Stamp comp layer when finished with step #3.
    Let’s Build a Fire…
    5. Create a blank layer in the layers palette….Normal blend mode; 100% opacity.  Make white your foreground color chip.  Grab the paint brush tool…normal blend mode; 100% opacity. Paint one flame on your layer. I have used the 1220 sized flame near the bottom of the brush set I linked earlier. Use the transform command …Ctrl + t (PC) or Cmd + t (Mac)…to size and position the flame. I used  also slightly warped the flame using transform warp. Since you don’t have that in Elements…slightly warp the flame in the liquefy dialog.
    Note: The above flame is pretty much backlighting…you are done with it.
    6. Change the color foreground color chip in your layers palette to 50% gray. Use the same brush tip you used in step #5. Size and position it so it closely matches the white flame in Step #5. Go to liquefy dialog and slightly warp it.
    Note: The goal is for the flames in step #5 and step #6 to be very similar but not exact.
    7.. Duplicate the 50% gray flame you made in step #6 twice. Turn off the top 50% gray flame for now.
    Fire is Bright...
    8. Now that video comes in that I linked.
    (1) Blur the 50% gray flame with Gaussian blur. I used 6 pixels. Go to menu and click Enhance or is it Adjustments<Hue/Saturation…check the box that says “colorize”; change master sliders to Hue 42; Saturation 100; Lightness 0.
    (2)Duplicate the flame you made above…step  (1). Go to the menu bar and click Enhance or is it Adjustment<Hue/Saturation…change master sliders to Hue -43; saturation 0; Lightness 0. Change this layers blend mode to Color Dodge blend mode and merge down…Ctrl + e on PC; cmd + e on Mac.
    Note: This layer will now say Normal blend mode; 100%.
    (3)I duplicated the merged layer I now have from step (2). I changed the blend mode of this layer to Screen and set the opacity to 100%.
    (4) I made a duplicate of the layer I have made in step (2)…the one that now says it’s in Normal blend mode; 100%… then blurred it with Gaussian blur. I used 46 pixels. I moved this layer down in my layers palette so that it rests beneath my other two colored flame layers. The white flame layer is directly below it. Leave this layer in Normal blend mode; 100% opacity.
    9. Go back to 50% gray flame you made in step #6...visibility eye should be off. You should have two of these gray layers if not duplicate one so that you do have tow 50% gray flame layers. (These were not blurred.)  These two layers need to be on the top of the stack. If they are not, move them up so that they are the top two layers. Turn on the visibility of the bottom 50% gray layer. Change the layer’s blend mode to Screen blend mode; opacity 100%. Grab the burn tool. Burn some of the flame base and randomly in the flame of the 50% gray.  Press and hold in the alt key (PC) or the opt key (Mac) and dodge the tops of the flames and do some random dodge work.
    10. Turn on the visibility for the top 50% gray layer. Leave this one alone…no dodge + burn. Set this layer to Screen blend mode; opacity 96%.
    11. Add layer masks to white and color flame layers…not the gray ones. Paint away any unattractive color spill. Bright orange edges…bright white distractions where flame edges don’t align.
    12. Make a composite layer of all layers up to date. Set this layer’s blend mode to multiply; opacity 47%. Add a layer mask and mask out everything but the flames. Tip: You can select the flames by ctrl + shift clicking on each flame layer thumbnail…the shift lets you add to a selection. On the Mac, cmd + shift click the layer thumbnails.
    Flames Reflect…
    13. Make a copy of one of your blurred color flames. Transform it so it rest over item that it should reflect on. In this case I have added a blurred flame onto my son’s eye. The flame is in Overlay blend mode; 33% opacity.
    14 Several steps Eye enhancements to my son’s eye…omitted because it’s off topic
    15. I used a gradient map with a fire like black/red/yellow/white gradient map set to Softlight blend mode; 17% to give my image a hint of a color cast. I masked it so only some skin, hair, and car areas have this slight color cast.
    Where there’s fire there is going to be some smoke...
    16. To make my smoke, I made a separate large document my photo size. I set my color chips to the default b/w. (Shortcut is D.) I went to menu bar and clicked Filter<Render<Clouds. Next I went back to my menu bar and clicked Filter<Render<Difference Clouds. I used Ctrl + f to repeat the Difference Cloud filter until I was happy with the effect…looking for swirled black lines…kind of like lightning. (If on a Mac, use Cmd + f to repeat a filter. I then used the transform command to enlarge the pattern I made. Be sure to scale it so that height and width both are enlarged equally. Next, go to the men bar and select<All ; Edit<Crop. You want to do to get rid of the excess. I think I transformed my patter to something like 200% which makes the file really big. You can do it on your image file but because of file size the transform will take a really long time. When happy copy/paste or drag/drop this pattern into your photo file.
    17. Now blur pattern really good using Gaussian blur. Now, add a layer mask to your pattern layer. Click the layer mask in the layers palette to target it and run the the clouds and difference clouds on the mask just as you do on the pattern layer. Just those filters…no blur.
    Basic smoke pattern final
    18. Duplicate this layer w mask twice. You should have three smoke copies. Turn off all but the bottom pattern copy. Use the paint brush and paint black in mask to hide the smoke everywhere but where you want to keep it. Set this layer’s blend mode to Multiply blend mode; opacity 15%.
    View of the inside one of the smoke layer masks
    19. Turn on the visibility of the next smoke pattern. Again use a black paint to paint where you don’t want paint. (Make this variable as you want the smoke to be varying opacity.)  Layer blend mode Multiply; opacity 15%.
    20. Turn on the visibility of the next smoke pattern…top one in stack. Again use black to paint where you don’t want the smoke. Set this layer’s blend mode to Multiply blend mode; opacity 1%.
    Fire is Gaseous...
    21. Make a composite of all layers by pressing ctrl + shift + alt + e if on PC. Use Cmd + shift + opt + e if on a Mac. Blur your composite image. I used 3 pixels. Set the blend mode to Normal; opacity 64%. Add a layer mask and fill it with black paint to hide the blur effect. Use the paint brush with white paint in the layer mask to blur any sharp edges and base of flames. Remember flame is gaseous.
    Above shows my layers for completed image. Notice the comp for clone layer is off. I did not need it after I did the clone to a blank layer to add some scorched cake around my son's fingers.

  • Help with displaying formated text

    I need some advice in displaying the results from my program. I recieve these results from a CGI program and then display it. I can format how the CGI outputs the text however I want, but in an attempt to make it look nice I have the CGI output html syntax and place my data in nice tables. This text I then send to a JEditorPanel and tell it the text type is html. But there are two problems. The first is, that the results look terrible. It places huge spaces between lines of text, the text is formated bad and at the beginning is the text "head", and "/head" inside of two boxes. The thing is though, if I view this same text straight in Netscape it looks great, but whatever HTML I send to the JEditorPanel looks terrible. Is there a way to improve its results or is there another , better thing to use than the JEditorPanel or a better way to use the JEditorPanel that will allow me to create a pretty, formated text output?

    This was an old post of mine and I don't remember exactly how I was trying to do it, but the problem was just something with the way I was setting up my JEditorPane.
    Now I declare it like this:
         javax.swing.JEditorPane ResultsDisplay = new javax.swing.JEditorPane();
         JScrollPane ResultsDisplayScrollPlane = new JScrollPane(ResultsDisplay);
         HTMLEditorKit htmlEdKit = new HTMLEditorKit();And I do this to set it up during initialization:
              ResultsDisplay.setEditable(false);
              ResultsDisplay.setEditorKit(htmlEdKit);
              ResultsDisplay.setContentType("text/html");
              ResultsDisplay.setEditorKitForContentType("text/html", htmlEdKit);and this during run time to display my HTML formated text:
                   Document doc = ResultsDisplay.getEditorKit().createDefaultDocument();
                   ResultsDisplay.setDocument(doc);
                   System.out.println(inputLine);
                   ResultsDisplay.setText(inputStore.toString());
                   getContentPane().validate();
                           getContentPane().repaint();some of this could be redundant, but it works.
    But are you sure you don't want the dukes? They're stuck to this question and I don't know what else to do with them

  • Need help with adding graphics to NSTextView

    I am looking for information on adding graphics to NSTextView so that the graphic is linked to a point in the text and will move with it as the window is resized. I understand that a subclass of NSTextContainer is needed to define the line lengths, etc. for NSLayoutManager. What I cannot figure out is how to know what text is being processed when the message to specify line positions is received by the subclass.
    What I really need is a sample program that shows how to link a graphic to the text.

    I did that bad it's not there and doesn't give me to option to click on it

  • Need help with Autonumber Format

    We are using unstructured FrameMaker 12 on a Windows 7 platform (64 bit).
    We need to number questions in an FAQs section, that includes the "Q" in bold followed by a colon that is not in bold.
    This is what the new paragraph style needs to do:
    1.[tab][bold]Q[Default ¶ Font]:[tab]What happens when XYZ?
    [tab][bold]A[Default ¶ Font]:[tab]This is what happens.
    We would like for the number and "Q:" to appear automatically and be formatted correctly with the new paragraph style, so all we have to do is type the question. (We would prefer not to use "Q##:" because it would require a unique indentation distance in the template.)
    The "A:" should also be indented and formatted correctly.
    Both the "Q:" and the "A:" would wrap around to the same indentation for long text strings.
    Can anyone provide the "building blocks" that can make this happen?  Is this possible?
    I tried to search for the answer in this forum and on the Web. I apologize if this is answered somewhere already.
    Thanks in advance.
    Tim

    This is certainly possible! assuming I've understood the question correctly, of course …
    All you need is a pair of paragraph formats, one for the questions and one for the answers, and a character format for the labels. Set the paragraph properties so that the numbering can be outdented, and set the numbering properties to add Q (or A, depending) followed by a sequence indicator and a tab. Here's a screenshot of how I'd do it for the questions.
    And here's a bit more explanation of how the Autonumber format works its magic …
    the Q: at the very start is the series label, and the colon is an essential part of the definition. By including a series label, you can set up different series; for example to number tables and figures separately.
    after the series label, Q {space} is the text that will be included before the counter; <n+> is the building block for a numeric counter that will increment by 1; the full stop after the building block is another piece of text, and \t is a tab character.
    the character format identifies a, well, character format that is applied to anything generated by the autonumbering; the format I've used just happens to be set to light grey.
    This already gives an idea of how elegant FM numbering can be. Icing on the cake in this case is that thanks to the series label you can also display the current value of the counter for the answer. The autonumber format I've used for answers is Q:A <n>.\t
    the Q: is the same series label
    A{space} is the text, and <n> is the building block for 'current value of counter identified by this series label'
    If your document simply alternates single-paragraph questions and single-paragraph answers, you can save yourself time by using the Next Paragraph Tag option to follow questions by answers and vice versa. You'll be amazed by how quickly you'll have your Q&A ready :-}

Maybe you are looking for