how to change default color of column graph using GemBox version 37.3.30.1160 - gembox-spreadsheet

how to change default color of column graph using GemBox version 37.3.30.1160.
If I create a .xlsx template and save the same it will work but I am trying to save the file as PDF and that's where its not working.

EDIT 2019-11-15:
In newer versions of GemBox.Spreadsheet (version 4.5 and above) we added support for chart formatting, see the version history page.
You can find Excel Chart Formatting example here. Also, here is another example in C# that shows how to change color of various chart parts like series, background, text, etc.
ColumnChart chart = ...
chart.SelectData(worksheet.Cells.GetSubrangeAbsolute(0, 0, 12, 1), true);
var red = DrawingColor.FromName(DrawingColorName.Red);
var green = DrawingColor.FromName(DrawingColorName.Green);
var blue = DrawingColor.FromName(DrawingColorName.Blue);
chart.Series[0].Fill.SetSolid(blue);
chart.Series[0].Outline.Fill.SetSolid(red);
chart.Fill.SetSolid(green);
chart.PlotArea.Outline.Fill.SetSolid(red);
chart.Outline.Fill.SetSolid(red);
ORIGINAL ANSWER:
GemBox.Spreadsheet currently does not have an API support for chart components styles. This information is currently supported only through a preservation and that is why it works for XLSX file, but the preserved information is lost when the input and output file format are not the same and that is why it does not work for PDF files.
However note that we do intend to implement this sometime in the future and if interested please feel free to vote for this feature in order to boost its priority.
But at this moment I cannot tell you exactly when it will be implemented.

Related

PDFJS: Text layer rendering twice

Here's the context:
pdfjs-dist: v2.2.228
angualar/core: 8.2.0 (hybrid Env with an AngularJs 1.5.X)
Objective: to upgrade pdfjs-dist to the latest versions (2.3.200 or at least 2.2.X)
I upgraded from pdfjs-dist 2.0.4xx, and here's what is being rendered:
So basically, instead of having the PDF rendered correctly, with highlightable text and so on, there's like a duplicate of the text: one version of the text is rendered correctly (graphically), the other version seems to work OK for text selection and searching.
When doing any search, PDFFindController works on the highlightable layer (as you can see the area with the greenish text in the upper part of the image).
Any idea what might cause this behavior?
this is due to the new update of PDFjs requires css file to style the pdf.
you can get more details on this from the following question's answer
PDFJS: error on Text rendering for the PDF

SSRS - Spacing between lines in single TextBox

I have a flat-file to be load in SSRS report. Which already contains New Line and required spacing. Like the below image:
Want to display same layout and newlines(CRLF) into SSRS. Which works fine If I use
≪Place Holder Property → Markup type = "None - Plain text only"≫
But I want to increase the spacing between Individual new lines.
So I tried below expression with the same other properties:
=REPLACE(Fields!Column1.Value, Chr(13), vbCrLf)
But It has increased the space almost double than my expectation. I also tried to convert ≪Place Holder Property≫ into ≪ HTML - Interpret HTML tags as styles ≫, but It has removed normal new lines which exist into flat-file.
I tried many existing solutions over StackOverflow but none of them are matching my requirement.
Could anyone please give it a try!
Edit-1:
Textbox.line-height is providing a facility to change spacing between lines, but not reflecting PDF output, only showing the effect on a web browser. My target output is PDF.
I am afraid that the thing you are asking about isn't possible.
“<br>” ,”<p>”,vbcrlf, font setting in textbox of any report ,the list mark , do not work with SSRS.

Spreadsheet Gear migration errors

I am migrating Spreadsheet gear of my application from 6.0.3.190 to
7.4.1.104.I am getting my issues with Color property.Can any one help me in this.Now I am using using Color = System.Drawing.Color; and also ToSGColor().This became very hectic to do in all places where ever we use color.I expect we should have some shortcut to do this.Can any one suggest me How can i get all functionalities with few changes only.I am also getting exceptions to c onvert IColorFormat.LineColor to system.drawing.Color.
Note the "Breaking Changes" page in the SpreadsheetGear 2012 documentation, which lists this particular change:
In order to support WPF and Silverlight, the core API has been
separated from the GDI+ and Windows Forms APIs and therefore uses the
new SpreadsheetGear.Color type rather than
SpreadsheetGear.Drawing.Color. SpreadsheetGear.Drawing.Color has been
moved to SpreadsheetGear2012.Drawing.dll. See
SpreadsheetGear.Drawing.Color for an example which uses the implicit
and static converters to convert between SpreadsheetGear.Color,
SpreadsheetGear.Drawing.Color and System.Drawing.Color.
SpreadsheetGear.Colors and SpreadsheetGear.SystemColors provide
helpful predefined colors to replace the use of predefined colors in
System.Drawing.Color.
So you'll need to ensure than any place where you were previously using System.Drawing colors now use SpreadsheetGear.Drawing colors, including API like IColorFormat.LineColor.
There aren't really any "migration" tools to automatically convert such instances to the new API. So you'll need to resolve these errors for each code file. Doing a Find/Replace keyword search for "System.Drawing" and "SpreadsheetGear.Drawing" could possibly speed up the process, though this would depend on what using statements you have added to each code file.

Setting SSRS BackgroundImage Source from field

I'm working on an SSRS template at present which pulls lots of its format information from a database. Part of this format information sets the Background Image of cells.
I'm currently filling the image by setting the Source to External and pulling its value from the database. This works lovely, however It means pulling the image from a network source each time and while a small efficiency hit, I'd like to try and remove that pull if possible by embedding the standard images.
Again this works fine, I can pull either an external image or an embedded image and display on screen. The problem comes when I'd like the option to do either.
I find that I cannot set the image Source from a field, there isn't an option in the GUI.
I've tried going into the code and entering the details there but I get a validation error:
The 'http://scemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition:Source' element is invalid - The value =First(Fields!bodyBackgroundImageSource.Value, "dsTemplate") is invalid according to its datatype String - The Enumeration constraint failed".
Has anyone else come across this and found a solution or know of a workaround? I can continue using only external images, but would prefer to avoid as many external calls as possible.
In our local environment, we tested this scenario and if the expression can return the correct image name, then the image can display properly. You can check if the "First(Fields!bodyBackgroundImageSource.Value, "dsTemplate")" expression return the image name existing under Images folder on Report Data window. And make sure the image source is embedded.

Dynamic Hyperlink in Livecycle Form

I am trying to figure out how to make a hyperlink in a Livecycle Form which points to a URL which will change on different days that the form is rendered. For example on one day I might want the hyperlink to point to:
mywebsite/mypage?option=XXX
and on another day I want it to point to:
mywebsite/mypage?option=YYY
The XXX and YYY can be passed into the form's data pretty easily as XML, but I just don't know how to make it so that the hyperlink is changed to correspond to this.
Any suggestions?
This can be accomplished with JavaScript in LiveCycle Designer. The following script, placed on the Form's docReady event will let you dynamically change the URL of a text object.
form1::docReady - (JavaScript, client)
// If this code is running on the server, you don't want it to run any code
// that might force a relayout, or you could get stuck in an infinite loop
if (xfa.host.name != "XFAPresentationAgent") {
// You would load the URL that you want into this variable, based on
// whatever XML data is being passed into your form
var sURL = "www.stackoverflow.com"; // mywebsite/mypage?option=xxx
// URLs are encoded in XHTML. In order to change the URL, you need
// to create the right XHTML string and push it into the Text object's
// <value> node. This is a super simple XHTML shell for this purpose.
// You could add all sorts of markup to make your hyperlink look pretty
var sRichText = "<body><p>Foo</p></body>";
// Assuming you have a text object called "Text1" on the form, this
// call will push the rich text into the node. Note that this call
// will force a re-layout of the form
this.resolveNode("Text1").value.exData.loadXML(sRichText, false, true);
}
There are a couple of caveats: URLs in Acrobat are only supported in Acrobat 9.0 and later. So if someone using an older version of Acrobat opens your form, the URLs won't work.
Also, as you can see from the "if (xfa.host.name !=...)" line, this code won't run properly if the form is being generated on the server, because forcing a re-layout of a form during docReady can cause problems on certain older versions of the LiveCycle server. If you do need to run this script on the server, you should probably pick a different event then form::docReady.
I a number of complaints from users in WorkSpace that clicking links opened them in the same tab so they lost their WorkSpace form, and there's no option to change that in Designer 11. I think the solution I came up with for that would work for you too.
I made buttons with no border and no background, and in their click event have this line (in Javascript, run at client)
app.launchURL("http:/stackoverflow.com/", true);
It would be easy to add some logic to choose the right URL based on the day and it doesn't cause any form re-rendering.
In some spots where the hyperlink is in line with other text, I leave the text of the link blue and underlined but with no hyperlink, and just place the button (no background, no border, no caption) over it. Does require positioned and not flowed subforms for that to work, so depending on your layout it could get a little clunky.
Wow, just realized I am super late to the party. Well, for anyone using ES4 facing a similar problem . . .
Ended up using a 3rd party component to manipulate the PDF's hyperlinks...wish there was a better solution as this one costs about $1000.

Resources