Query |
Response |
1) The element will miss their original positions(Not too much).
2) In the ReportDesigner, if I place an element like TextBlock near the bottom and then lunch it a new page will appear, but if I reopen the ReportDesigner then lunch the preview no more page created.
3) When the report in preview mode, if I click on Print layout button, few blank pages add, more precisely, after each page in my report a new blank page added, in my case 02 blank pages were add. |
The extra blank page added due to the sum of report body width and margin exceeds the Report page width). As per MS layout when report width is lesser than the (Body Width + (Left Margin + Right Margin)), an additional page will be added in print layout. Kindly reduce body width or increase page width in order to avoid the extra blank pages. Please refer the following link for further details.
Also, we have modified your report based on this and it can be downloaded from the following link.
|
Thanks Mr Vinoth for this quick replay, and I am sorry to mark this as a bug.
I checked the article you mentioned plus the article the other guy mentioned too(http://sqlblog.com/blogs/stacia_misner/archive/2011/03/18/34259.aspx), but still don't get how to calculate and set the margins.
Also, how I can set a page break. so other details will be printed in a second page, currently as a temporary solution, I set the report double high, then in the second half place the object but this is not a practical solution.
Query |
Response |
I checked the article you mentioned plus the article the other guy mentioned too(http://sqlblog.com/blogs/stacia_misner/archive/2011/03/18/34259.aspx), but still don't get how to calculate and set the margins. |
As we updated earlier, when the sum of body size and margin value exceeds report size blank page will occur, so you have to design the report based on the report page size. In your report the report BodyWidth=11.5in, Margin=0in and ReportWidth=8.5in, as per RDL layout calculation (BodyWidth(11.5in)+Margin(0in)>ReportWidth(8.5in)) , so extra blank pages added. You have to reduce the BodyWidth(11.5in) in your report to make BodyWidth(11.5in)+Margin(0in)<=ReportWidth=8.5in. Please find the below snap of your unmodified report in which the body size is greater than report size.
|
Also, how I can set a page break. so other details will be printed in a second page, currently as a temporary solution, I set the report double high, then in the second half place the object but this is not a practical solution. |
You can set “Page Break” from report item properties to the tablix and rectangle report item in our report designer. Please refer the below MSDN link for more details.
|
Hi Vinoth again ;),
Making the diffrence between BodyReport and the report itself solves to me many future issues.
Now, I have another question, while I get to separate each report details in independent page, after printing it in paper or PDF, I see a lot of empty space, it's like the report resized and get printed in half page.
UPDATE:
After I sent to the printer, the report got resized too tiny.
I am using A4 format, and also chechek the printing settings in my application, and here my printing button:
ReportWindow RW = new ReportWindow();
string reportPath = System.IO.Path.Combine(new DirectoryInfo("reports").FullName, "9takrir-tarbawi16.rdl");
RW.ReportViewerControl.ReportPath = reportPath;
List<ReportParameter> parameters = new List<ReportParameter>();
ReportParameter parameter = new ReportParameter();
parameter.Name = "RP01";
parameter.Labels = new List<string> { "ds" };
parameter.Values = new List<string> { "5465464" };
parameters.Add(parameter);
RW.ReportViewerControl.SetParameters(parameters);
RW.ReportViewerControl.RefreshReport();
RW.Show();
After setting the report to paper A4 format(previously I set custom height), now it prints as expected.
I don't know what it changes now but it is surprisingly the report now printed in 03 pages instead of two.
Report width = 21.0058cm / Height = 29.6926cm
Body width = 20.5cm / Height = 58.5cm
From the code nothing is changed, and the report is set to A4 format.
So what is wrong I am doing here?
This is the updated the version with parameters I pass from code behind, still getting 04 pages printed.
From code I only pass parameters like this:
ReportWindow RW = new ReportWindow();
string reportPath = System.IO.Path.Combine(new DirectoryInfo("reports").FullName, "9takrir-tarbawi16.rdl");
RW.ReportViewerControl.ReportPath = reportPath;
List<ReportParameter> parameters = new List<ReportParameter>();
ReportParameter parameter = null;
//string LightingStatus = Convert.ToBoolean(LightingStatusText.IsChecked) ? "نعم" : "لا";
string wilaya = wilayaText.Text;
parameter = new ReportParameter();
parameter.Name = "wilaya";
parameter.Labels = new List<string> { "wilaya" };
parameter.Values = new List<string> { wilaya };
parameters.Add(parameter);
string baladia = baladiaText.Text;
parameter = new ReportParameter();
parameter.Name = "baladia";
parameter.Labels = new List<string> { "baladia" };
parameter.Values = new List<string> { baladia };
parameters.Add(parameter);
RW.ReportViewerControl.SetParameters(parameters);
RW.ReportViewerControl.RefreshReport();
RW.Show();
I can summarize my issue in two cases:
01) If I run my report from the REPORT DESIGNER then it prints two pages as expected.
02) If I run the report from my application then it shows three pages instead of two.
In the attachment you will find a simple C# report application project to demonstrate my problem. Please don't just run the report from REPORT DESIGNER, try it also from the project I included to see the issue.
Query |
Response |
01)If I run my report from the REPORT DESIGNER then it prints two pages as expected.
02)If I run the report from my application then it shows three pages instead of two. |
We have tested the provided report in SSRS ReportViewer and our control both the output shows three pages, refer to the below attached snap for your reference.
We suspect that in your application and report designer application assemblies are in different version due to this we got different page count, please share the assembly version details of report designer application and your application assemblies version with us it will be helpful for us to provide a solution at the earliest. |
Hello Mr Vijay,
First, did you checked my simple project that I included here http://www.syncfusion.com/downloads/support/forum/131890/ze/SimpleReport_bddc5185 ?
The assembly I am using is: 15.2.0.46
The Synfusion Report designer is: 15.2.0.46
In the project I attached, two pages get printed in Report Designer and three if it's printed from my application.