Page 3 of 5
Re: Dynamically adding a subreport to a page
Posted: Mon Aug 19, 2013 12:05 pm
by HighAley
Hello.
Please, try to use next code:
Code: Select all
this.HorizontalLinePrimitive1 = new Stimulsoft.Report.Components.StiHorizontalLinePrimitive();
this.HorizontalLinePrimitive1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(3.8, 0.4, 7.8, 0.0254);
this.HorizontalLinePrimitive1.Color = System.Drawing.Color.Black;
this.HorizontalLinePrimitive1.Name = "HorizontalLinePrimitive1";
this.HorizontalLinePrimitive1.EndCap = new Stimulsoft.Base.Drawing.StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
this.HorizontalLinePrimitive1.StartCap = new Stimulsoft.Base.Drawing.StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
Thank you.
Re: Dynamically adding a subreport to a page
Posted: Thu Aug 22, 2013 4:55 am
by prajan
Hi,
I tried using the following code :
Code: Select all
StiVerticalLinePrimitive VerticalLinePrimitive6 = new Stimulsoft.Report.Components.StiVerticalLinePrimitive();
VerticalLinePrimitive6 = new Stimulsoft.Report.Components.StiVerticalLinePrimitive();
VerticalLinePrimitive6.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 3.6, 0.01, 2.3);
VerticalLinePrimitive6.Color = System.Drawing.Color.Black;
VerticalLinePrimitive6.Guid = null;
VerticalLinePrimitive6.Name = "VerticalLinePrimitive6";
VerticalLinePrimitive6.EndCap = new Stimulsoft.Base.Drawing.StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
VerticalLinePrimitive6.Interaction = null;
VerticalLinePrimitive6.StartCap = new Stimulsoft.Base.Drawing.StiCap(10, Stimulsoft.Base.Drawing.StiCapStyle.None, 10, true, System.Drawing.Color.Black);
MainRepPage.Components.Add(VerticalLinePrimitive6);
VerticalLinePrimitive6.Page = MainRepPage;
I am getting the output as shown in "Wrong.jpeg".
I want to get the output as shown in "Right.jpeg". What do I need to do to achieve the same?
Thanks
Re: Dynamically adding a subreport to a page
Posted: Thu Aug 22, 2013 1:01 pm
by HighAley
Hello.
Please, send us a working sample project for analysis.
Thank you.
Re: Dynamically adding a subreport to a page
Posted: Thu Aug 22, 2013 2:15 pm
by prajan
Hi,
PFA the page and the data for the same.
Thanks.
Re: Dynamically adding a subreport to a page
Posted: Fri Aug 23, 2013 12:27 pm
by HighAley
Hello.
Sorry, but we couldn't reproduce your issue.
We need to see a FULL WORKING SAMPLE PROJECT, not one cs-file.
Thank you.
Re: Dynamically adding a subreport to a page
Posted: Tue Aug 27, 2013 5:00 am
by prajan
Hi,
PFA the web application for the report and the data for the same in xml format.
Please let me know if you need any other information
Thanks.
Re: Dynamically adding a subreport to a page
Posted: Tue Aug 27, 2013 10:26 am
by HighAley
Hello.
Please, try to Save report template at the end of the CreateReport2 method. If you open this report template in the designer you will see that your report is not right.
Please, chenge your code to get right report template then it will be possible to create it without primitives.
At first remove DataBands without Data Sources and Panels from sub-reports.
Thank you.
Re: Dynamically adding a subreport to a page
Posted: Wed Aug 28, 2013 11:29 am
by prajan
Hi,
The report is now showing correctly.
PFA the report web application.
Please let me know if you need anything else.
We need to use primitives only as we cannot use borders 'cos some of the bands are not displayed based on certain conditions.
Please help us achieve the same.
Thanks.
Re: Dynamically adding a subreport to a page
Posted: Thu Aug 29, 2013 11:34 am
by HighAley
Hello.
Prajan, please, read next message carefully.
I understand that you sent me simple report template at first time and there are not all columns.
And knowing it I am repeating my previous message:
Aleksey Andreyanov wrote:Please, try to Save report template at the end of the CreateReport2 method. If you will open this report template in the designer you will see that your report is not right.
Please, chenge your code to get right report template then it will be possible to create it without primitives.
At first remove DataBands without Data Sources and Panels from sub-reports.
The StiVerticalLinePrimitive is connected to the components with 2 Cap points.
They are VerticalLinePrimitive6.EndCap and VerticalLinePrimitive6.StartCap. If they are on the component, then they move with it. But if it's on the page then it's static. You are adding static Line in your code.

- Line.png (2.85 KiB) Viewed 1944 times
To help you understand I am sending you your report template.
Why do you add Panel10, Panel14, Panel 20, Panel23, Panel26, Panel33, DataBand11, DataBand15, DataBand24 and DataBand28?
You don't need all of them.
Thank you.
Re: Dynamically adding a subreport to a page
Posted: Mon Sep 02, 2013 1:38 pm
by prajan
Hi,
I have a doubt.
Please find attached the static report 'BS_Horz_NoPC.mrt.
In this report also we have so many databands without data source (Databand5, Databand2, Databand8, Databand1, Databand7, Databand9).
Also attached is the page which is used to run the report.In this report also I have added vertical line primitives to Page1. These are coming just fine in the report.
But when I try to generate this report dynamically, and I add vertical line primitives to the main page, then I don't get the report right.
Please let me know how I can dynamically generate the same report with vertical line primitives.
Thanks