I have a project written in C# in VS2010. I am attempting to print a barcode but am having an issue. The barcode print page is located in a crystal report.
The bar code field has the formula that equals *25664A-1$1%0/A* which is correct.
It is in the font - SKANDATA C39.
When it prints, the rest of the report prints correctly but where the barcode should show, it instead shows- *25664A-1$1%0/A* .
Is this due to a wrong font? I need to get this to print the barcode instead of the numbers. It is something specifically wrong with the barcode field since the rest of the report works/prints fine and the formula extracts the correct data.
Any help would be appreciated? If you need more information let me know.
Thanks.
I downloaded a new barcode font - C39hrp24dhtt0 (from http://www.free-fonts.com/font/c39.html)
Simply changed my old font to my new font (SKANDATA C39 to C39hrp24dhtt0) (in format editor - font tab) and it now prints the barcode and scans perfectly. Had to make changes to the font size to get the same appearance but after that it works properly.
Related
I am new to C# and StimullSoft Report.
I have a report.mrt file that created by Stimulsoft (ver 2012) and Paper size that report has been designed is A4.
On form I have a header, Footer and several textboxes. no panel and etc.
If users change paper size from print preview, all of content on REPORT.mrt has been moved! (Big, Small, Change and So ugly!) What is the solution?
Thanks
Align the Header and footer texts by using Dock style property. Also it will be better if you use use latest versions of Stimulsoft.
I'm using ASP.NET, Visual Studio 2013- SP4 with Crystal Reports v13.0.15 and I have problem of Arabic text alignment as follows:
Right and center aligned text always appear left aligned on printing, it is shown OK in browser and designer (I have tried
different printers:my Deskjet printer, Microsoft XPS writer and pdf
writer).
This problem is with Arabic text only, English text aligned well when printed.
I face this problem with TextObject and with multiline FieldObject (or FieldObject with CanGrow set to true).
Exporting to pdf works well, I have problems with printing only (using the ActiveX Mode in CrystalReportViewer, IE11).
For example the following picture is browser view (everything is aligned Right, gray boxes are text objects):
while the printed version is as follows:
I appreciate any help. thanks in advance.
This is due to use english word with arabic.
if only arabic text come it work good if english text come with arabic then it align automatically left.
I have a problem with CR (version that ships with VS2008). Report has two report headers, one of them is used for watermark (a picture), using the "Underlay following sections" option.
The problem is that, while this picture underlays field objects, it overlays lines in all of the sections (details, report footer etc...).
Any solutions? Help would be mostly appreciated, I'm starting to lose my hair ...
I found "a solution" by replacing the line object with a textbox object, whose one of the borders is set to single. This way, the watermark stays under, and I have my line.
This might be a bug in CR ...
I had a similar challenge, I had an image in Header 'A' which was set to underlay following sections. The challenge was when I built a Header 'B' and drew a box or a line, they were obscured by the image.
(Text boxes worked fine but I needed to draw a box and some lines.)
The work around was I simply put a Sub report into Header 'B' and then I went into the sub report, drew all my boxes and lines and great news, they all appeared as I hoped when I ran the report. I hope this helps somebody else.
R.
I have a local report in a WinForms application that is giving me some trouble. On this report, I have a table and I am trying to change the BackgroundColor of the Detail row.
When I change it to "Red" and view the report, the row is Red as hoped for. When I export the report to Excel and PDF, the row is Red, too. So far, so good...
If, however, I change the row color to something like "DarkSeaGreen," it will display in my ReportViewer control ok and the PDF looks good, too, but the copy I exported to Excel just shows this row as gray.
I have tried out a few different colors... some work, some don't. I have also tried setting this property different Hex values; again, some work, some don't.
Has anyone experience this before? What is causing the colors to turn to gray when the report is exported to Excel?
Any assistance is greatly appreciated!
Edit: Also, the same colors that don't display in Excel don't print from the ReportViewer either... looks like Excel isn't the main culprit.
Have you tried using a hexidecimal value for your colour and see'ing if Excel picks it up. My guess is that Excel doesn't support the CSS colour naming codes.
Select your row, table, text box etc and set the colour to something like #2f4fa2 - see if that works in Excel.
I'm using iTextSharp( C# iText port) to create pdfs from text/html. Most of my text is in Hebrew, a Right-To-Left language.
My problem is that PDFs show RTL langauge in reverse, so I need to reverse my strings in a way that would only reverse the RTL text without reversing any numbers or text in English.
It is my understanding that fribidi allows doing that on linux, but I couldn't find any solutions for this problem for Windows.
I would welcome any suggestions, including an alternative to iTextSharp that would do this automatically (if one exists).
To show RTL texts by using iTextSharp correctly:
You need to set the font's encoding to BaseFont.IDENTITY_H
Then you have to use container elements which support RunDirection, such as PdfPCell, ColumnText, etc. and now you can set their element.RunDirection = PdfWriter.RUN_DIRECTION_RTL;
HTML displays Hebrew/Arabic in Logical mode, and in PDF you need to store it Visual mode. What you need to do is convert from Logical to Visual mode. There are some libraries which do this (google for minibidi which is BSD licensed IMHO, or fribidi which is GPL or LGPL).
My real suggestion would be to change direction. Write a very small application in Qt4 which takes as first argument the URL, and the second the PDF to write. Since Qt4 has HTML support (via QtWebKit) has has the option to print to PDF (post script and SVG as well) this should be simpler then writing your own HTML->PDF solution.
PDFCreator is a free tool to create PDF files from nearly any Windows application.
It installs as a Windows printer driver, such that it can be used by any Windows program that has a print functionality.
You can treat your input as simple text strings to be printed, and maybe using the print menu option of Notepad will create the correct PDF.
If you want to dive a little deeper into right to left C# printing, use StringFormatFlags.DirectionRightToLeft string format with Graphics.DrawString() calls.
A snippet from a PrintPage Event Handler:
lineFmt = new StringFormat(StringFormatFlags.DirectionRightToLeft);
e.Graphics.DrawString(textToPrint, font, Brushes.Black, startX, ypos, lineFmt);
Just put the string in table cell:
PdfPCell cell1 = new PdfPCell(new Phrase("מספר",font));
cell1.HorizontalAlignment = 2; //0=Left, 1=Centre, 2=Right