Crystal Reports VS 2008 Different Wrapping Behavior - asp.net

I have a text box which is 7.5" wide and I set Can Grow. Inside the textbox I have placed a TEXT database field. I set the field to use the RTF format. When I export the report to PDF on the developer machine I am able to get the word wrapping where it should be (after the finagling with the right margin). However, when I export the report on the server, I get word wrapping about an inch sooner than on the development machine.
So here is some more information: the PDF of the report is generated by an ASP.NET application on both the development machine (from within VS 2008) and the server; I am using the Crystal Reports VS 2008 runtime.
I have tried a few ideas so far:
I found out that Wordpad does not save the page margins into the RTF document. It always uses the last used settings for the page margins which is 1.25" L-R and 1" T-B.
I tried editing the RTF source and adding the appropiate page margins: \margl720\margr720\margt720\margb720 which sets all margins to 720 twips (0.5").
I tried setting the Wordpad defaults for the page margins to 0.5". This is different for each user though. I have the Application Pool for the ASP.NET application running as a specific user. I tried setting it under that user and no change. Is it possible that the Crystal Report is being generated under a different user? Or that Crystal Reports always uses a specific user for this information?
After the settings on the server had no effect, I set the margins on the development machine back to the default and re-ran the report. This causes the report to have the same problem as on the server. So it has to be something with the Wordpad page margins.
So the question is: how do I get these settings set for the server? Or how can I figure out under which user the Crystal Report is being generated?

It turns out it had to do with the printer drive as Paul suggested. To fix the issue I changed the report to use No Printer. This did not solve the weird wrapping of the RTF by Crystal Reports. To fix that I made the text box that the field was in wider than the page. I had to find how far off the page by trial and error.

Related

SSRS reports rendering differently in the ReportViewer than in Visual Studio

My SSRS rdl report is rendering differently in the ReportViewer in an ASP.NET application than it does in BIDS (for this project we are on SQL Server 2008 R2 and BIDS). It renders the way I want it in BIDS, but the Report Viewer changes the placement of some of the textboxes. Specifically, it's pushing some text boxes down the page and creating a large area of whitespace.
I am using version 10.0.0.0 of the report viewer DLL.
Running the report in the ReportManager web UI in SSRS displays the report the same way as in the Report Viewer (not the way we want it).
BIDS is on SQL Server 2008 R2 SP3.
Ideas on how to mitigate this?
SSRS report elements when rendered in certain formats such as HTML cannot overlap in any way, whereas in the VS/Report Builder preview or formats such as PDF they can.
Due to this, if you aren't very careful to avoid these overlaps in your design you will see a different layout in the ReportViewer where SSRS has 'pushed' your report items around to remove the overlap.
We have similar issues, but different versions of SSRS. This page and many similar ones give information about rendering, but none of them seem to answer the questions "does this text fit in this box?" and "How big will this box be?" Rendering to IE, Chrome, Safari, Word, and PDF was an exercise in frustration and compromise, especially considering that Visual Studio and Report Builder were also different. In all cases, the height and width of the text boxes changed, the font size changed, the spacing around the text changed.
Our technique was to prioritize the various output formats, then find settings that produced the best output based on those priorities. Given this, users see better (but still not quite perfect) results than we see in Visual Studio.
I was able to find a solution for our particular problem by minimizing scenarios where SSRS will resize an element during rendering. For example, we had a text box that had the default height on the canvas (roughly the height of one row of text). The text had an expression with HTML content that included several line breaks. This caused SSRS to resize the textbox and push other elements down the page, even though there was space to fill without moving other elements. When I increased the height of the textbox on the canvas to fill the available space, SSRS stopped moving other elements around on the page.
My lesson learned is to set the size of an element on the canvas based on how big it is likely to be when it's rendered. If SSRS decides it needs to increase the size of an element, it starts moving other elements around on the canvas (even if there is space to fill without moving things around).

SSRS - same PDF report (rdl file), different line height on different systems

When reports from our system in Singapor where copied to our system in Germany they show different formatting: The generated PDF report in Germany has more space between the lines and the footer is not visible.
When reducing the top and bottom padding of the text fields from 2p to 1p the lines are nearly equally high and the footer is back in place.
Checked differences, but not found:
both SQL 2008 R2
same version of report viewer
same configuration of report viewer
same font used
report solution was also copied - no difference
Where can I look for differences? I thought the formatting was only done in rdl file itself? Any Ideas? Please ask for more of my system details, if needed. Thanks.
Additional information from my side:
I generate both reports (same report on different systems) on the same browser and download and open both PDF on the same system with the same Acrobat Reader - so screen resolution is also the same. PDF Properties as Page Size and PDF Producer and Version is also the same.
anonymized report: left Singapor - right Germany
When you are in Preview Mode - Click button to the right of the Print Icon called [PRINT LAYOUT].
Here, you can manipulate the header/footer and margin size in order to fit everything in your report on one page.
Once you've done this, you should be able to go back into the report, right-click outside of the report, or inside the header/Footer and change the properties. You can change the length to the sizes you chose in preview mode that fit everything into your screen. Let me know if this helps

Crystal Reports shows barcode ONLY locally

I use Crystal Reports to show an .rpt file in an asp.net page.
When I run both at server, the CR's preview on design software and the WebPage(IE) where the CR viewer is embedded, the reports shows the barcode and can be printed.
(the barcode is a function Bar128AB( *BarTextIn*, *Subset* ) )
BUT when I run it from another computer or from another browser(Firefox, Chrome) on the same server, the barcode shows the input string(BarTextIn) from Bar128AB function and not the result(final barcode) of the function.
The font which is used to represent the barcode is Code 128AB HR, which has restricted embeddability, but I don't mind for exporting it in PDF, just view and print it.
HOW can I fix it?
How can the rest browsers(Firefox, Chrome) on the server show the barcode properly?
How can another computer show the barcode properly?
You need to install a couple of packages in order to show the barcode properly.
Install the latest package of crystal reports
Install this patch for the font with fsType value 0 to achieve installation
Also according to this thread you can try to print the page and see if barcode its works
Try to install Code 128AB HR font on another computer and then to run the report there.
Is it working now? If it is, it means that your solutions need the font to be installed on any client (and I think it is).
If you think this is not the right solution for you, you could turn into javascript barcode tools (this is one).

IE failed to generate reports

One of our client is trying to generate reports with lots of sub reports, its a single page report. If they generate it for 2-3 years it works for all browsers, but when they generate it for 5 years. Report works fine in chrome and firefox but IE will not be able to load reports and show IE window "Internet explorer cannot load page".
There is no errors in eventlog or in IE console. Even Fiddler does not give any information why IE could not able to load reports. It says response 200.
Reports are generated successfully, as I can see that in log.
I am not sure why this is happening with IE(8,9,10). Please check images below
Thanks
This could be due to the memory management problem in Internet Explorer, as you are fetching the 5 year data.
There is a work around for the memory problem.
->Go IIS
->Open your reporting Website
->Check which application pool its using
->Right click on that and recycle it.
->Then try generating the report.
Not sure if it resolves your problem.
I've seen a very similar issue recently - it started a few months ago, across multiple unchanged reports, and seemed to be triggered by hard or soft Page Breaks (I found that out from a lengthy process of elimination).
That scenario was SQL Server Reporting Services 2012 SP1, via the Native/Report Manager portal.
Does your report render with page breaks?
My solution was to set the Report / InteractiveSize / Height to 1000cm. Then for each hard page break, I disabled it for browser rendering by setting the Page Break / Disable property using this expression:
=Globals!RenderFormat.IsInteractive
The result is a little untidy in the browser, but renders with page breaks in other formats (PDF, Word, Excel). Importantly it stopped the browser freezing in IE.
Personally I have moved away from the report display control. It provides inconsistent display on different platforms (al least it did in 2013 when I did the lions share of converting a project).
Instead I render to PDF (Word or Excel) at the server and use an embed tag to display the content to the user. You are guaranteed to know what it looks like on the user screen that way. A level of caching is possible and its a lot easier to work with.

Crystal Report in ASP.NET - display image

I am using a Crystal Report on my website to dynamically build a PDF file for download. This is working great. However, now I want to add an image to the report. When I go to Insert - Picture, browse to my image file, and click OK nothing happens, which leads me to believe that I'm adding it incorrectly. How can I do this? Also, does the image need to exist on my web server or is it imbedded in the report?
So you're adding the picture to the report through the Crystal Reports designer?
Possibly the picture is in an unsupported format? Try saving it into another format and add it again, might just work!
As far as I'm aware, the image will be embedded into the report.

Resources