Setting the size of a ReportViewer report manually - c#

What I need to do is to add subreports to a report that can grow or shrink dynamically, depending on how much data is available to display. Is there any way to set these to do that? Google tells me there's a CanGrow/CanShrink functionality, but it only seems to effect textboxes.
Any help is appreciated!

I'm not sure if you ask for this, but you can add your subreports inside the parent table of your main report. Follow this link:
https://blogs.msdn.microsoft.com/sqlforum/2011/01/02/walkthrough-add-a-subreport-in-local-report-in-reportviewer/
Is for asp.net but I have followed this guide to make the same for windows Forms.

Related

Screen Navigation

I am working on a WPF app with a header that consists of a progress bar, date and time, and status. This app also contains a Footer with 5 buttons to navigate between different screens (settings, results, products, etc.). I did this originally by making the navigation button bar a usercontrol and all other content is in seperate windows. I am not entirely happy with this and am sure there is a better way. Is it better to have a main screen with only the header and footer and do all other content as seperate user controls? Or should all windows stay seperate and show the user controls for header and footer on initialize. I currently have the latter but it requires me to track what windows are open to keep from opening more than one of the same. I also think it may be more manageable to have the main entry point and window settings and just aadd content to center section. Any advice on best way to achieve this is appreciated.
I'm going to explain my experience with your problem and how I solved it.
What I can suggest is to create custom controls for footer and header.
Then create a page control that inherits from Page named CustomPage for example, and put footer and header layouts inside CustomPage layout.
Then create another and last control inheriting from CustomPage named for example CustomPageContent. This page will present footer and header and you will customize it with specific content for every different page. You will have at this point all functionalities from Page Control and all logic for navigation will be supplied. You will be able to controll this contents as a frame.
I think that this solution will give you a little bit work but is a really elegant solution and your code will be simplyfied.
Hope will help!

Crystal Reports, RightToLeft Property

In my program I am using Crystal Reports 13 in my soft, and I need them to make readable for Arabic UI too. Everything from right to left. Wanna know, if there is a RightToLeft property for that Reports and I can't make that report templates twice, because there are lot of them. What can you offer to do. I have searched through Google, and only found one solution
One of the solutions for this (without creating extra copy of the same report) is to modify existing report(s) to have 2 sections for each row (if it's feasible) i.e. one for Left to Right Orientation and the other for Right to Left Orientation and display them conditionally based on Langauge selected.
But it will be a lot, really lot work and I think there will be another way to solve this problem.
Thanks

Draw A Custom Table In Windows Forms

I want to draw a custom table to be a way similar to this one in the picture
I have tried the TableLayoutPanel but i can't get something similar to this one, So your help would be very appreciated and thanks in advance.
You can create an RDLC report and use the Table Control in that, that is really customizable to the extent you need.
Perhaps you'd be considering to populate the table with some data, I am pretty sure RDLC will come in handy for that cause.
You can go thru this link on how to work with it:
http://msdn.microsoft.com/en-us/library/ms252067%28v=vs.80%29.aspx
You can still use a TableLayoutPanel and change the ColumnSpan of the controls inside the panel.
Check this tutorial

Custom Print Preview -- Design Choice

I need to implement a custom print preview screen for one of the pages in my MVC web project. I was just wondering what some of the recommended ways of doing it are. Basically, we have a dropdown menu with a bunch of different options-- each one displays a different statistical report under the dropdown menu. For the print preview, I only want to preview the report, not the whole page.
Should I simply take the html and cut off the stuff I don't want, and re-render it? Or create some kind of other document, XPS maybe, and display it as that? Alternate CSS maybe?
Not that anyone is probably interested, but I ended up just using the HTML from the original page and disabling/restyling all of the links and stuff, and hid unnecessary elements via javascript.

Is it possible to disable 'Print' and 'Export' buttons on Crystal Reports?

I have Finished Designing my first Crystal Report using ASP.NET, I am Providing user my own way to Print and Export report, now i need to Hide or atleast disable the default Buttons provided in Crystal reports, Is it possible to do? how?
Take a look at ReportViewer class properties ShowExportControls and ShowPrintButton. There're more properties to disable standard viewer UI controls.
If you are running an older version of Crystal Reports (such as 4.6 included in VB5/6) then this can be achieved in the following way:
set the property "WindowControls=False" on the C.R. ActiveX control.
Doing so also disables the ability to Export and - as a side effect - also hides the buttons to zoom in/out of the report.
I'm leaving this comment for reference purposes only as - by now - everyone should be moving away from this VB/CR version.
Still, if like me, you are faced migrating or maintaining an older package this should do the trick.
go to crystal reports viewer properties
and set these settings to false in VS 2015
HasExportButton="False" HasPrintButton="False"
CrystalReportViewer1.HasPrintButton = false;
CrystalReportViewer1.ShowPrintButton = False
using short cut key to take print out ,while you disable print button

Categories

Resources