I am learning InfoPath 2010 and have a form that I am creating, but have two issues that I don't know what to do about. In the form I have created there are several columns (repeating tables). I pulled the data in from a database and have already set the conditions for what I want to be returned in the SQL, under the Data tab. So I have the correct data returning, however the issue is that the data is not in a consistent even row across the form (lines on a piece of paper) the lines begin to become offset by the second row and continue to the last. I have tried creating a table to put the data into and was hoping that this issue would go away, but that is not the case. How do I fix this cosmetic issue? OR where do I find the HTML code? When I select "Code Editor" under the Data tab, I am given VB code and there is not much code to work with.
Thank you for your help in advance.
CompGeekess
As I was continuing to find the resolution to my delima, I noticed that when a you have a column selected, Properties and Layout tabs appear at the top. In the Properties tab you can set the width and height of the column using in, and px. I noticed that not all of the columns had the same height in px, so I made each the same height, saved and previewed the form and now the rows are no longer offset. Interesting how something SO simple can make a huge different. The difference was only 2px off.
InfoPath actually creates an XML document, not HTML (if you right-click on a field in your Data Source you'll see a "Copy XPath" option). The best way to control your layout is using a Layout Table (Tools -> Design Tasks -> Layout)
I would recommend avoiding setting pixel values as well, and leaving control heights to "auto" whenever possible. If you're using a layout table and having alignment issues, right click in the table and go to Properties. You'll have Horizontal and Vertical cell alignment options (for the cell contents) in the Table and Cell tabs. You can also select multiple cells (just select the contents of them) and then assign that alignment to all in the same way.
Related
I have an rdlc report in my application. The report looks good when seen on the web page, but when I choose the option of exporting to Excel, I get some columns merged in more than one cells. I don't want columns to be merged. How can I prevent this. I already saw this post, but the link provided in this post is not working.
Any help with this issue will be appreciated.
As the post you shared suggested, this is usually down to cells/textboxes not aligning in your report design.
SSRS will attempt to replicate the layout that you see in the report preview (or webpage in your case). To do this it will add additional columns to provide the correct spacing and then will merge cells that cross those boundaries.
Make sure that all your textboxes align with no horizontal gap etc. For example, if your report contains a table/matrix and a textbox with a title. Make sure that the title textbox starts and finishes exactly in line with a cell in the table/matrix.
Note that cells will still be merged if they cross the boundaries of columns (e.g. the title in this example, might be merged across several columns depending on it's width).
Sticking with our title scenario, if you need to stop it from merging under any circumstances then you could try this (untested).
Create two textboxes, one wide enough to fit the title in and another that is the same width as other data that shoudl be in the same column in the final excel output. For example, if you have a table with 6 columns, the first textbox will be the same size as those 6 columns but the smaller version will be aligned with the first table column only.
Set the location of both these textboxes to the same location (so they overlap).
Then in the hidden property set one to be hidden when Globals!RenderFormat = "EXCELOPENXML" and the other when this expression is not true. This way the short textbox will only get rendered when exporting to excel, and the logn one will only get rendered to screen.
Depending on version SSRS etc you will have to decide which render format(s) to check for.
See here for documentation on RenderFormat
https://learn.microsoft.com/en-us/sql/reporting-services/report-design/built-in-collections-built-in-globals-and-users-references-report-builder?view=sql-server-ver15
I am working for the Vanuatu government at the moment and there is a very specific reporting requirement. The report needs to generate a formal document ("statement") for students ("learners") who have achieved some courses ("components") of a full qualification but not the complete qualification.
The dataset consists of a list of learners and for each learner the list of components they have achieved.
The requirements that generate issues:
A border should be displayed around the page content.
The number of components vary per learner.
There is specific data at the top and at the bottom of the page. At the bottom of the page there is data here that is learner dependent.
There needs to be one page per learner (I can control this by using slightly different versions of this report that would work based on the number of components per learner.
The design I created for the report can be seen here. This is the design that should work for any learner who has passed 1 to 4 components.
However, this does not work, because, depending on the number of components the learner has achieved, the data at the bottom is pushed down.
I thought I might be able to solve this by putting the image at the background of the whole report per page, and then put a header and footer in with the data that is learner specific. But this does not work either because it is not possible it seems to have a background image that covers the whole report page, including a header and future.
And the other problem is that there is a learner specific number (the statement number) that should go in the future, and I don't think I can put dataset data like that in the footer.
I also thought of splitting the background image in 3 parts, one each for the header, footer and body. But then I run into the same problem because I still need to get the learner specific statement number in the footer.
Another solution was to maybe have a fixed set of rows (partly invisible) in the list of components, to force the height of this list, but this does not really work either, because some titles of the components will be longer than the width of the page and wrap and take up two lines of text. Some others may not. So I don't know the height of each component line.
Is this possible at all in SSRS? Any help would be greatly appreciated.
Try creating a rectangle in the space that will be taken by the components list.
Then cut the current text box containing your expression, click the rectangle then paste inside it. This will ensure that the rectangle is the container for the textbox.
Then, in Report Properties, set ConsumeContainerWhiteSpace to True. This should allow the textbox to grow within the rectangle
Having a report with 5 different tables and what i want is to have each of these tables starting at the top of a new page. These tables are currently in a rectangle each which has a hide/show expression. Surrounding these rectangles is a list which is doing the correct grouping for the tables and also doing page breaks after each group(3 groups in total: Association, Organization, and Type. There are 5 different types, one for each table(there's a filter on the tables).
When showing my report in regular preview mode there is no problem but when doing so in print layout preview I get the third table starting on the third page but not at the top and after that I dont know what is happening... all page breaks just stops working. Sometimes whole empty pages are rendered.
This is how the report layout looks like
This is some of the resulting pages (not in order)
Just so you know, I have been trying consumewhiteSpace, Checking the height and width on my report Height = 15,1cm and width 24cm and its just a horisontal A4 page.
The grey color is the list-rectangle. Why is it acting up like that and how do I make it work?
So it looks like the report is fixed. Don't really know what I did but I redid the report(like a houndred times before), really made sure that all the page breaks, filters, report margins and visibility conditions (not only in the tables visibility propery but also on every static row under advanced mode) were right. I made some table changes for example using stepped table instead of nested. And found some wrongs I had made previous considering the tables layout (guess everything has a purpos even hard work and long wait...).
Thanks for the help though!
I'm implementing a Gantt Chart in SSRS via the Horizontal Range Chart and notes I found here (http://pnarayanaswamy.blogspot.com/2010/09/range-bar-chart-gantt-chart-using-ssrs.html). I've successfully implemented the Gantt Chart plus some additions so it can span multiple pages (DynamicHeight based on # of rows). My problem is that no matter what I do, I end up with double blank pages at the end of the report. I.e. if my Gantt chart is 10 pages, I'll have 10 blank pages at the end.
Any ideas? It's most definitely not a margin issue, as I've removed everything from the report except the Gantt Chart and then made it 1" wide and still get the double-pages issue. It is always exactly double the # of pages it should be. I've turned on all borders to see if there are any dynamically expanding boxes that might cause this but nothing is showing up. I'm open to ideas from anyone who has experienced anything similar. This is probably rare, though, as charts don't typically span multiple pages.
Thanks for your help.
Rocky
Even though you've explored a lot of the options, this still sound like a width issue. certainly a width issue: have you checked the width of the "Body" (That's the name that will show in the Properties pane.) You can find this by clicking on a blank part of the report, the background, and then use the properties pane to alter the width (The Body Properties dialog doesn't have options to change this.) Another way of changing these is by dragging the border of the page around in the designer.
Make sure that the width of the Body is less than your page width minus margins. Those, as it sounds like you know, are set in Report menu -> Report Properties.
I currently have a Matrix within an SSRS report. Usually, the matrix will fix to a standard page in portrait mode, however there are cases where the length of the columns will exceed a page. Is there a way to have SSRS render the report to a PDF where this Matrix would auto-size and shrink all of it's contents, ie: font, column widths to fit within a page? I don't want to shrink all objects in the SSRS report to fix the page, just the width of the Matrix.
If you were dealing with height, I would say that that's not a tablix configuration. The tablix would be only expanding because of the columns. And the columns would be expanding because the textboxes that are inside them expand.
So, you would need to deal with it on each textbox by Right clicking the textbox inside the column and select "text box properties". On the general tab uncheck "allow height to increase".
Strangely there isn't an option to width. This link tells about the CanGrow and CanShrink properties but I wasn't able to make it work. Maybe if you want to give it a try.
-> Go to report tab
-> Select the Report Properties
-> Select Paper Size "Letter" and "Width & Height" as per standards ("8.5 * 11" or "11*8.5")
Despite the downvote, Nawaz has the correct answer
To fit it to a specific page, especially for pdf output, then you set the size to A4. I always have three templates for this purpose, screen, pdfland and pdfport. I resize my headers, footers, titles and corporate imagery for each of these templates. It's a pain, but you can incentivise your users to ditch the pdfs and the printing and the paper by creating decent dashboards for them so they have live data to hand. That's really the only decent way I've found of getting them out of old and poor habits
So either right click outside the body of the report and select Report properties, or select it from the properties window tab at the right of the screen, then set the size to either letter or A4. It's not ideal, but if you do not limit the report size in this manner any dynamic columns will render outside the pdf and create multiple pages that need to be stuck together later
edit: If you really need to resize in a hurry, you can open the report as code, and use the replace function to reduce the size, however it is often easier to reposition the tables by hand