Reputation: 61
I am developing a Windows Form application in c# .Net 4.5.1 and I 've added few rdlc reports as part of it. Each report was added for a different purpose and is being shown in a separate form based on user request. Each form is simple it simply calls the adapter to populate a dataset then refreshes the report to display it:
namespace TestReporting
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'CMSDataSet.BillingDoc' table. You can move, or remove it, as needed.
this.BillingDocTableAdapter.Fill(this.CMSDataSet.BillingDoc);
this.reportViewer1.RefreshReport();
}
}
}
My problem is that when I print the report or when I press print layout, the report is displayed small at the top left corner of the report viewer see a snapshot. After searching a lot in the internet, I think the problem is related to machine resolution which was set by default on my Windows 10 machine to 3840 X 2160. The font size of my machine font was set to 350% which is the maximum which I like . I've noticed that when I reduce the machine font size to 100% the report prints fine and is taking the full view of the report viewer but this font size is not readable by humans. Is there a way or a code which I can write to ignor the machine setting just for this form which holds the report viewer? by the way I've tried to change the form AutoScaleMode property but it didnt' work.
Any kind if help is really appreciated.
Upvotes: 5
Views: 649