I use
and set the page setup of .rpt
- I checked the No printer option and Dissociate formatting page size
- I chose User Defined Size in dropdown
- I set Unit in pixel (Horizontal: 1200px, Vertical: 816px)
But the report viewer still still shows Letter size and the remaining Columns are not being Displayed ...
you can use Cross-Tab on crystal report so that the page width will automatically adjust depends on number of column.
Interesting question!
I suggest forcing via javascript the width of elements in your page.
A script like this should work (the name of the elements could change, inspect you HTML),
//execute when page is displayed on screen
$(document).ready(function () {
$("#CrystalReportViewer1_toptoolbar").css("width", 1200);
$("#CrystalReportViewer1__UI").css("width",1200));
}
don't foget to add jquery
<asp:ScriptManager ID="ScriptManager1" EnableScriptGlobalization="true" EnableScriptLocalization="true" runat="server" AllowCustomErrorsRedirect="true">
<Scripts>
<asp:ScriptReference Path="~/Scripts/jquery.js" ScriptMode="Auto" />
</Scripts>
</asp:ScriptManager>
Related
I was trying to insert "Page x of y" in the report from report generator in Matlab. The page footer content does not have any options as such. How can I modify it in the custom section.
I was working in the report explorer.
As far as I know, page headers and footers can only be created for DOCX or PDF formatted reports.
Actually, I would write hundreds of line speaking about how to build up headers and footers in your report documents... but I think that reading this link for you will be more than enough to understand how to build them up.
A little excerpt:
This code defines a document part template Chapter that uses two page
footers: one for odd pages and one for even pages. The page number
format is Arabic numerals.
<dptemplate name="Chapter">
<layout style="page-margin: 1in 1in 1in 1in 0.5in 0.5in 0in;
page-size: 8.5in 11in portrait">
<pfooter type="default" template-name="MyPageFooter"/>
<pfooter type="even" template-name="MyEvenFooter"/>
<pnumber format="1" />
</layout>
<!-- Define content for your chapter here--fixed text and holes as needed -->
</dptemplate>
These document part templates define the page footers.
<dptemplate name="MyPageFooter">
<p style="text-align:right;font-family:Arial,Helvetica,sans-serif;font-size:10pt">
<page/></p>
</dptemplate>
<dptemplate name="MyEvenFooter">
<p style="text-align:left;font-family:Arial,Helvetica,sans-serif;font-size:10pt">
<page/></p>
</dptemplate>
The DOM API elements you are looking for are:
page for current page number
numpages the total number of pages in the document
Background:
I have a report with a large dataset on a crosstab element. The report will only cater to spreadsheet format so the width of the report will not matter.
I have tried setting the Ignore Pagination property to true. Split Type to prevent but some of the data still breaks and moves on the bottom of the sheet.
Any help would be greatly appreciated.
I found the solution to my problem. I was using iReport 3.7.4 and there was a bug in the UI. Apparently the crostabs property ignoreWidth="true" was showing as ticked in the UI but it was actually missing from the xml. You can locate this property in the crosstab tag as shown below:
<crosstab ignoreWidth="true">
...
</crosstab>
Is there any way to decoratively define the List width in the HTML.
I know I can do it
var autoComplete = $("#autoComplete").data("kendoAutoComplete");
// set width of the drop-down list
autoComplete.list.width(400);
but I want to do it in HTML only.
I have already tried:
data-list-width="400"
When you create an autocomplete in Kendo UI, it creates a second HTML element (a wrapper) for the drop down options. This element is given as id the id of the original one plus -list.
You can define a CSS style for this newly created wrapper as:
#autocomplete-list {
width: 300px !important;
}
You need to use !important otherwise the value calculated by Kendo UI has prevalence over yours.
Example in this JS Fiddle: http://jsfiddle.net/OnaBai/n55w8/
I got the answer from telerik today:
Currently, the width of the popup element can be set only programatically.
Salam!
The .width(400) is not a configuration setting, it is jQuery width method, so you can't set width for your autocomplete decoratively.
If you use MVVM framework in your project, maybe Custom binding help you to add a custom binding like <input id="autoComplete" data-bind="listwidth: 400" /> for your autocomplete.
See this demo if you want to use custom binding.
I'm new to ActiveReports 7, I have a rdlx Report using a stored procedure to populate multiple lists with TextBoxes. The data is appearing correctly, however I am unable to get the TextBoxes to break when their contained data exceeds the length of the page. Instead, the TextBox remains unbroken and starts on the next page leaving a large empty gap. I have the containing Lists' 'KeepTogether' property set to 'False' and it doesn't help. How can I make these Lists and/or TextBoxes break at the end of the page and resume on the next?
Check the type of report you have. There are the "ActiveReports 7 Page Report", aka FPL (Fixed Page Layout) report and the "CPL Report" (Continuous Page Layout).
Fixed Page Layout is for creating a new page for each record. Suitable for invoices and similar reports. You need a "CPL report" so that it only adds pageas as needed for the content.
To get a CPL Report take the following steps from inside the designer in Visual Studio:
Project > Add New Item
Choose the "ActiveReports 7 Page Report" item here.
Choose Report > Convert to CPL Report.
Those steps should effectively have the effect of changing "Page" to "Body".
Below are the steps I used to create a CPL report that has a list with a textbox containing very long text (longer than a page) and it renders across pages okay:
Add a list
Add a textbox to the list. The default properties should work fine, but the relevant properties on my textbox are:
TextBox.CanGrow=True
TextBox.WrapMode=WordWrap
List.KeepTogether=False: Although technically this should be fine either way if the textbox/list are larger than a page. KeepTogether=False will just prevent it from moving to a new page if it is starting half way down the page.
Let me know if you still don't crack it and I'll upload my test report here somewhere for you.
I'm working on a site in EPiServer, and whenever I create a page property with the type set to "XHTML string" (which uses the WYSIWYG content editor in Edit mode), it wraps all content in <p> tags.
Is there any way to prevent this from happening? I can't remove the paragraph margins universally through my CSS (e.g. p {margin: 0 !important;}) since I do need the margins for actual paragraphs of text. I've even tried going to the HTML source view in the editor and manually deleting the <p> tags that it generates, but it immediately adds them back in when I save!
It doesn't happen when the property type is either a long or short string, but that's not always an option since the content might contain images, dynamic controls, etc.
This is becoming a real nuisance since it's very hard to achieve the layout I need when basically every element on the page has extra margins applied to it.
As Johan is saying, they are there for a reason - see more info here. That being said, it's not impossible to remove them. It can be done in one of two ways (taken from world.episerver.com:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
myEditor.InitOptions["force_p_newlines"] = "false";
}
or
<script type="text/javascript">
tinyMCE.init({
force_p_newlines: false
});
</script>
You can add your own custom TinyMCE-config that removes P-elements or strip them out using regular expressions either when saving the page or when rendering the property/page.
I think it's a bad idea though. P-elements are what the editors generate the most and in most cases their content is also semantically correct. Better to wrap your property in a div with a class and adjust margins using CSS like you mention.
If you're using a version of EPiServer with TinyMCE editors, you can insert <br /> elements instead of <p> elements if you type shift-enter instead of enter. This should eliminate your margin problems.
More info at the link below:
http://www.tinymce.com/wiki.php/TinyMCE_FAQ#TinyMCE_produce_P_elements_on_enter.2Freturn_instead_of_BR_elements.3F
EDIT: My comment below answers his question better.
I discovered that while I can't remove the <p> tags from the source view (because it adds them back in automatically), if I replace them with <div> tags, it'll leave things alone. It does mean that I've got an extra <div> wrapping some elements that I don't really need, but at least a <div> doesn't add margins like a <p> does, so...good enough!