I have made changes to text in a sentence in a report.
The changes display correctly in Design View and also in Layout View, but when I display it in print preview the previous text is displayed, not the new amended text. If I then go back to Layout view, it now displays the original text just like print preview did. The display in Design shows the new amended text.
I am using access 2013 on a *.accdb database which I was given by the previous user. Any ideas why this is happening?
I would imagine that it something to do with my print preview?
Most probably there is VBA code behind the report that changes the text, e.g. in an OnFormat event that only runs in Print preview.
Open Design view, open the report's code module, and search for the text you see in Print preview.
Related
I am building a label report that requires the user to input a Bulk Order Number that will generate multiple labels. When viewed in preview mode and on the report server, images on the report for postage and company logo appear on every instance of a label (report page).
However when exported to PDF, these images only render on the first label (page)
I considered this may not be an issue, as the user could print from the report server when accessing the report. This isn't the case, as when trying to print, report server creates a PDF for you to print from. There are no other options regarding printing other than page size and orientation, a PDF seems to be the only method from which you can print from.
The images I use have the visibility controlled by parameters, so you can select 1st or 2nd class postage, and choose to have the logo visible.
Each image also has the RepeatWith property set to the Tablix that contains order and address details.
When exported to word, the labels all appear as desired with postage and/or logo images on each instance. This is a step I would like to avoid, as it would be much nicer to have the user print directly from the report server, even if this still requires a printer friendly PDF to be created.
I have attached am image to show PDF output.
Any ideas how I can get these images to render on each label (page)?
EDIT
Image of design page
Based on the design view image you posted, it looks like the only thing repeating is your tablix containing the address information. The SSRS RepeatWith property doesn't seem to work well with .pdf exports so the workaround for this would be to drop everything into a single cell on a list object and grouping using the Order_No to repeat everything. This should remove the need to mess with RepeatWith and give you the desired results.
In my DB i have a table called "PrintList" populated with a random number of records and a report called "ReportList", which is linked to "PrintList", that is used to print all the records of the table above.
EDIT: I would let the user to see a print preview in Access to check the list and then choose if print it or not, so i prefer to avoid using code to print.
Is it possible to handle the "ReportList" print event and delete all "PrintList" records after the report is printed? Right now I use a button to empty the list via SQL, but it will be more useful to empty it after printing it.
Report/section events like On Format or On Print are fired both for Print Preview and for actual printing. So the report doesn't know, and thus can't handle your requirement.
I'd use a form with buttons for Preview and Print, and delete the records when the form is closed (because you can't prevent the user from printing from the preview).
The whole requirement looks a bit strange, TBH.
Open your report in design mode.
If the properties pane on the right isnt visible, press F4 to make it visible.
In the properties pane, click on the Events tab.
Find the OnPrint event and click the little ellipses to the right of it to open a VBA window ready to accept your code for that event.
Wondering if someone can point me in the right direction. I currently have a report with 5 sub sections of data, each surrounded with a Rectangle.
I am wanting each sub section to appear on a new page and then be able to export to Excel and each section to appear on a new Tab.
I set Page Break / Break Location in each Rectangle to "Start" and label the PageName to what I want to call the Tab. When I run the report the 4 subsections show correctly but I am left with a blank page before I get the 5 section, but when I export it to Excel it appears correctly.
What I want is 5 pages in the report for each section and when exporting I want 5 tabs, can someone tell me where I am going wrong with setting the pagebreaks if that is indeed what I am doing incorrectly.
Thanks
As you are successfully exporting to Excel, but not the report viewer, this suggests your report and page sizes are not correctly set up on your 4th subsection.
When you have report elements that are slightly too large for your report page, the parts that 'overhang' will generate a new page of just the part that overhangs. This is often a very small amount of white space, so it looks like the page is completely blank. When you are exporting to formats such as excel, this does not matter so you correctly see the page breaks as new sheets.
To check whether this is the case, add borders and fills of different colours to all your rectangles and then run the report. On your 4th 'blank' page, if you see any colours or borders you will know which rectangle or report element is growing beyond its page.
I'm using SSRS (specifically the Report Builder) for generating some fairly basic reports from SQL Server 2012. Report Builder 3.0. When I add a field from the database that is stored as rich text (with the tags and all), it simply displays all of those tags right on the report, instead of showing the properly formatted text.
I've dug around in the tools as much as I can, and can't find a way to get that field to display in a formatted way.
Is there a function, or setting, somewhere that I'm missing that will get the text to display properly?
I don't believe it's possible to display Rich Text in an SSRS report.
You could render the Rich Text to an image file, and then display the image on the report.
However, it is possible to use HTML markup which could also be of use to you.
To add HTML from a field in your dataset into a text box
On the Insert tab, click List. Click the design surface, and then
drag to create a box that is the size you want.
The Dataset Properties dialog box opens. You can use a shared dataset or a
dataset embedded in your report. For more information, click Dataset
Properties Dialog Box, Query (Report Builder) or Dataset Properties
Dialog Box, Query.
On the Insert tab, click Text Box. Click in the list, and then drag
to create a box that is the size you want.
Drag an HTML field from your dataset into the text box. A
placeholder is created for your field.
Right-click the placeholder, and then click Placeholder Properties.
On the General tab, verify that the Value box contains an expression that evaluates to the field you dropped in step 3.
Click HTML - Interpret HTML tags as styles. This causes the field to
be evaluated as HTML.
Click OK.
Source: MSDN - Add HTML into a Report (Report Builder and SSRS)
This means you have a couple of options:
You could write a function that removes the Rich Text tags, leaving you the plain text to display.
Render the Rich Text to an image file and display the image on the report.
Instead of using Rich Text in your dataset, you start using HTML markup.
Write a function that replaces the Richt Text tags with equivalent HTML styled tags. This would be a little more work but still a valid solution.
I need to display a Textbox in the body of the report, but it has to be on a separate last page. It is actually a Word file that needs to be shown in each report, but seeing as how the only way to accomplish this is to put the file to the Report Server and then access it with a link, I decided to copy the contents of the file to a Textbox.
This and this question on SE are similar, however it is not exactly what I need.
You can achieve this by adding items with appropriate page breaks to the report.
Say I have a simple report with a table and a textbox:
The end result looks about what you'd expect:
However, we can force the textbox onto a new page by embedding it in a Rectangle and setting the Rectangle to always be preceded by a page break:
Now the report displays the textbox on the last page:
Tables themselves can also have page breaks, but since it's just text with no dataset it makes sense to me to use a Rectangle here.