Alternativeapproaches aren't so good. Using display is tricky because if any element has display:none then none of its descendants will display either. To use it, you have to change the structure of your page.
Using visibility works better since you can turn on visibility for descendants. The invisible elements still affect the layout though, so I move section-to-print to the top left so it prints properly.
Notice how simple this is? No popups, no new windows, no crazy styling, no JS libraries like jquery. The problem with really complicated solutions (the answer isn't complicated and not what I'm referring to) is the fact that it will NEVER translate across all browsers, ever! If you want to make the styles different, do as shown in the checked answer by adding the media attribute to a stylesheet link (media="print").
Using the visibility can cause a lot of spacing issues and blank pages. This is because the visibility maintains the elements space, just makes it hidden, where as display removes it and allows other elements to take up its space.
The reason why this solution works is that you are not grabbing all elements, just the immediate children of body and hiding them. The other solutions below with display css, hide all the elements, which effects everything inside of printableArea content.
I wouldn't suggest javascript as you would need to have a print button that the user clicks and the standard browser print buttons wouldn't have the same effect. If you really need to do that, what I would do is store the html of body, remove all unwanted elements, print, then add the html back. As mentioned though, I would avoid this if you can and use a CSS option like above.
I had a similar issue but I wanted (a) to be able to print the whole page, or (b) print any one of several specific areas. My solution, thanks to much of the above, allows you to specify any div object to be printed.
The second does the real work and the third cleans up afterward. The second (printDiv) activates the print media style sheet, then appends a new rule to allow the desired div to print, issues the print, and then adds a delay before the final housekeeping (otherwise the styles can be reset before the print is actually done.)
A big plus for this approach it provides a general solution to printing selected content from within a page. It also allows use of existing styles for elements that are printed - including the containing div.
There is no one solution that will work well for all cases, so it is good to have all those choices and I'm adding another solution that works much better in some cases. This solution is a hybrid of two categories: hide all content of , then copy the content of the printable element to a new and append it to . After printing, remove the newly added and show the content of back. This way, you won't lose the styles or events, and you don't mess up with opening a new window. But like all other solutions, it won't work well for all cases. If your printable element's styles depends on its parents, you'll lose those styles. It is still much easier to style your printable elements independently from its parents than having to style the entire website for printing.
The only hurdle is figuring out how to select all content of . For simple pages, the generic style body>* will do the trick. However, complex pages usually have tags at the end of body' and also some `s that are used for dialogs, etc. Hiding all those is fine, but you don't want to show them after printing.
I tried many of the solutions provided.None of them worked perfectly. They either lose CSS or doesn't work in all browsers. I found a perfect and easy solution that neither losses CSS and work perfectly for all browsers.
The printDiv() function came out a few times, but in that case, you loose all your binding elements and input values. So, my solution is to create a div for everything called "body_allin" and another one outside the first one called "body_print".
I tried many of the solutions provided.None of them worked perfectly. They either lose CSS or JavaScript bindings. I found a perfect and easy solution that neither losses CSS nor JavaScript bindings.
A dead-simple supplementary print-only css will hide and show respective elements. Some benefits of this approach is that all styles are preserved, it does not open a new window, there is no need to move around a lot of DOM elements, and generally it is non-invasive with your original document.
Combining the solutions from and , we arrive at a solution suitable for systems that utilize preprocessed CSS (such as Sass or SCSS) without losing component styles. This solution can be employed universally throughout code and isn't limited to specific IDs.
The guidance provided in this FAQ pertains to the reporting of over-the-counter (OTC) transactions in equity securities to a FINRA Facility (a Trade Reporting Facility (TRF), the Alternative Display Facility (ADF) or the OTC Reporting Facility (ORF)). This guidance relates only to the trade reporting rules, as defined in FAQ 100.2 below, and does not address other member obligations under applicable FINRA rules or the federal securities laws, including but not limited to, recordkeeping obligations under SEC Rule 17a-3.
All references in this FAQ are to FINRA rules. Effective December 15, 2008, the NASD Marketplace Rules (the NASD Rule 4000 through 7000 Series) were transferred to the consolidated FINRA rulebook as the FINRA Rule 6000 through 7000 Series. See Regulatory Notice 08-57 (October 2008). To facilitate the transition to the consolidated rulebook, FINRA has created conversion charts that map NASD and incorporated NYSE rules to new FINRA rules and vice versa.
A100.1: The TRFs are facilities through which members report transactions in NMS stocks, as defined in SEC Rule 600(b)(47) of Regulation NMS, effected otherwise than on an exchange. FINRA has established the following TRFs (each in conjunction with the pertinent Exchange): the FINRA/NASDAQ TRF Carteret, the FINRA/NASDAQ TRF Chicago and the FINRA/NYSE TRF. As used in the FINRA trade reporting rules and these Trade Reporting Frequently Asked Questions, the term "FINRA/NASDAQ TRF" means either the FINRA/Nasdaq TRF Carteret or the FINRA/Nasdaq TRF Chicago, as applicable, depending on the facility to which the member elects to report. The ADF is both a trade reporting and quotation display and collection facility for purposes of transactions in NMS stocks effected otherwise than on an exchange. The ORF is the facility through which members report OTC transactions in OTC Equity Securities and Restricted Equity Securities, as those terms are defined in Rule 6420.
A100.3: All OTC transactions in equity securities to which a FINRA member is a party must be reported to FINRA, unless expressly excepted from the trade reporting rules (as discussed more fully below). Reportable OTC transactions include trades in NMS stocks effected otherwise than on an exchange, which must be reported to the ADF or a TRF, as well as OTC trades in OTC Equity Securities and transactions in Restricted Equity Securities effected pursuant to Securities Act Rule 144A, which must be reported to the ORF.
A100.4: For purposes of the trade reporting rules, a "trade" or "transaction" entails a change of beneficial ownership of securities between parties (e.g., a purchase or sale of securities) in which a member participates (e.g., as a dealer or an agent).
A100.6: A tape or media report is a trade report that is submitted to a FINRA Facility and reported to and publicly disseminated by the appropriate exclusive Securities Information Processor (SIP). Another term that is often used with respect to these trade reports is "for publication." In certain limited circumstances, trade reports submitted for publication may be suppressed from public dissemination (e.g., transactions in Restricted Equity Securities effected pursuant to Securities Act Rule 144A, as well as T+365 trades and trades executed on a non-business day.
A100.7: A non-tape report can be either a "regulatory" report or a "clearing" report, neither of which is publicly disseminated. A regulatory report, sometimes referred to in the trade reporting rules as a "non-tape, non-clearing" report, is submitted to FINRA solely to fulfill a regulatory requirement (e.g., to report certain transactions subject to a regulatory transaction fee or, where applicable, to report the offsetting "riskless" leg of a riskless principal transaction). A clearing report, sometimes referred to in the trade reporting rules as a "clearing-only" report, is used by members to clear and settle transactions; information reported to FINRA in a clearing report is transmitted by FINRA to the National Securities Clearing Corporation (NSCC). Clearing reports also can be used to satisfy a member's obligation to provide regulatory information to FINRA, if applicable.
A100.8: The time of execution is the time when the parties to a transaction have agreed to all of the essential terms of the transaction, including the actual price (e.g., the published closing price or end-of-day volume weighted average price (VWAP)) and number of shares to be traded.
For non-tape reports of transactions such as step-outs and the offsetting leg of a riskless principal or agency transaction, the execution time is the time of allocation. See, e.g., FAQs 301.4, 302.7 and 303.4.
A100.9: "Normal market hours" are from 9:30:00:000 a.m. until 4:00:00:000 p.m. Eastern Time, and trades with an execution time outside of this period are considered "outside normal market hours." The FINRA Facilities support milliseconds. Thus, for example, a trade executed at 4:00:00:001 is considered "outside normal market hours" and must be modified accordingly.
A100.10: Yes. Secondary transactions in unlisted DPP and REIT securities fall within the definition of "OTC equity security" under Rule 6420 and must be reported to the ORF, unless the transaction qualifies for an exception or exemption from trade reporting, or the security qualifies as a "restricted equity security," as defined in Rule 6420. Rule 6622.01 provides that for purposes of reporting secondary market transactions in non-exchange-listed DPP securities, the following definitions shall apply. "Date of execution" means the date when the parties to a transaction in a DPP have agreed to all of the essential terms of the transaction, including the price and number of the units to be traded. "Time of execution" means the time when the parties to a transaction in a DPP have agreed to all of the essential terms of the transaction, including the price and number of the units to be traded.
3a8082e126