i used code 128 to a generate bar code in crystal report , so when i print report in a A4 it detect well but when it print in sticker those are not detect by bar code detector but i checked using bar code printing software it works fine,help...
Related
In an instructional video I recently watched, entering print() in viewDidLoad() caused the print() text to appear at the end of the text displaying in the console. But when I run the same code, the text appears in the middle of the console (as in, additional text following the body of the print() text displays in the console--see screenshot for example). Here is the code I am referring to:
override fun viewDidLoad() {
super.viewDidLoad()
print("Hello World!")
}
screenshot of print() command displaying in the middle of the console instead of the end
Bug in Xcode 8: it will print stuff automatically in viewDidLoad, viewDidAppear, etc. You are printing your code in view did load, and Xcode will print logs after view did load, that is why it's in the middle.
They are likely using a different Xcode version. Xcode 8 is still in beta and they are printing a lot of different things into the console (especially if you have network requests). The runtime is hitting your print statement before printing some of these other statements.
If you're talking about the console being on the right side: see the two squared icons with a bar inside, highlighted in blue, in the lower right part of Xcode's window? Click on the left one: it will hide the properties panel and expand the console at full width.
If you're talking about the fact that "Hello World!" is in the middle of other text, that's because this other text is debug information that appeared at the same time as your print statement.
Within my project after I run the tests I get in my coverage tab:
Then when I tap on the gray arrow for distanceTitle():
And for static method findLocationWithIdentifier():
And for non static method deliveryInfo():
Now the questions are:
DBLocation.distanceTitle is fully covered (blue progress bar is fullfilled) - Does it mean 100% coverage for that method?.
When I am inside that method, it is grayed out, and on the right side there is number 0. What does it mean?
Why my findLocationWithIdentifier method is white, and next to it is number 70? Why that function is not grayed out, since it is called such 70 times? Am I wrong?
What about static method? I called them within code, but here progress bar is 0% and within code it is white.
What does it mean? How to read following:
blue progress bar
grayed out lines
number next to lines in code
why static method are no computed to the coverage value?
For me it looks like the values are reversed to the progress bar and moreover it is computed wrong. Am I right or not?
For now I reported a bug to Apple.
To answer Questions 2 and 3, Xcode uses color to tell you what code was executed when running the tests. Xcode highlights code blocks on the right side of the editor. Code that was executed is gray (it's pretty faint), and the number on the right side tells you the number of times it was executed. Code that was not executed is highlighted in red to alert you that it was not executed. Since the code was not executed, the number on the right side is 0.
To answer Question 1, the blue progress bars show the percentage of code coverage. A fully blue bar indicates 100% coverage. Your screenshots are the symptom of a problem/bug in Xcode. The coverage tab says the function distanceTitle() has 100% coverage, but in the editor, distanceTitle() is highlighted in gray.
I have no static methods to test code coverage so I cannot answer Question 4.
I have rdlc file report (standtart A4, Landscape), that has
<PageHeight>21cm</PageHeight>
<PageWidth>29.7cm</PageWidth>
Problem is, when i'm trying to print (in docx, Word 2010 and 2013) that one of the test printers doesn't understand page format - in "Print preview" window, page size = "Custom page Size 11.69x 8.27", "Landscape Orientation". But document in preview mode is croped from sides. If i select page format "A4" or try to play with margins preview normalizes.
If i select diferent printer everything is well.
If i try generating report in pdf also everything is well.
Is this problem with my rdlc, printer or Print preview window? How to solve it? (so that customer won't need to select page format everytime)
Update
I opened up my docx as xml, and found that landscape tag was missing w:orient="landscape". If i add it - it works well. Now problem, how to do it programaticly? (ReportViewer.WebForms are user here).
I always used these settings and never had problems:
<PageHeight>21cm</PageHeight>
<PageWidth>29.7cm</PageWidth>
<LeftMargin>1.3cm</LeftMargin>
<RightMargin>1.3cm</RightMargin>
<TopMargin>1.5cm</TopMargin>
<BottomMargin>1.5cm</BottomMargin>
Maybe you have to set different left/right margins but probably is a specific printer problem.
So what i did, was workaround but it worked.
Using DocumentFormat.OpenXml i manually added document layout.
Can you combine a portrait report and a landscape report using Quick Reports Pro?
Quick Report Help File Snippet:
The way to handle this situation is to use a TQRCompositeReport component. Drop one on the form where you want to kick off the printing. First you need to define a handler for its OnAddReports event, which calls the TQRCompositeReport.Add method to add all the TQuickRep components you need to print. Suppose the reports you want to print are held on forms called RepNewCust, RepOrderSummary and RepStockReorder, and in each case the TQuickRep component on the form is called 'Report' (see the section 'TQuickRep in detail' below for why you might do this). Then your OnAddReports event handler should look like this
procedure TForm1.QRCompositeReport1AddReports(Sender: TObject);
begin
QRCompositeReport1.Reports.Add(RepNewCust.Report);
QRCompositeReport1.Reports.Add(RepOrderSummary.Report);
QRCompositeReport1.Reports.Add(RepStockReorder.Report);
end;
Now you can call QRCompositeReport1.Print to print out all three reports in a single batch, and QRCompositeReport1.Preview to preview them together. There are also TQRCompositeReport component properties that let you set up paper sizes and set an overall title for the composite report - basically everything you need to handle the output from the multiple reports in one place.
I'd like mix between Portrait and Landscape as follows:
RepNewCust.Report (Portrait)
RepOrderSummary.Report (Portrait)
RepStockReorder.Report (Landscape)
Can this be done?
It can not be done. I received the following reply from the developer:
Hi,
It can't be done with the present code. I'm not sure why but mixing report orientations just doesn't work.
Regards,
QBS Software Ltd
I am using iOS 4.3 and Apple's suggested method for printing a PDF, which is to set the shared UIPrintInteractionController's printingItem property to an NSData object containing PDF data. It's very easy, which is great, but I've found that when printing a PDF via this method, the content starts 4mm lower on the page than if I print via Preview.app on my Mac. As I am printing to pre-cut labels, precise positioning is important.
It appears that somewhere in the process, a (blank) header is being added to the page, which is causing the content to shift down the page. The resulting horizontal margins are the same on both iOS and Mac OS X so I suspect it really is a header, and not an all-around margin.
I have checked the following:
Is the printer adding the header? No, because the same results can be seen when printing to the Printer Simulator.
Is the iPad using a different paper size to the Mac? I have used the delegate method to ensure that the UIPrintPaper is the same for both.
Can I edit headerHeight for the UIPrintPageRenderer? No, because a renderer is not created when setting a printing item directly.
My workaround is to make the PDF generator (the server) create the PDF content 4mm higher up than it ought to be, but this breaks printing from Mac OS.
Out of ideas now! Thanks for any assistance.
You should check Apple's sample code PrintWebView. I believe the problem your having is because of the hardware margins. See SIMPLE_LAYOUT constant in PrintWebView sample to learn more. Hope this helps.