a printing style

Stimulsoft Reports.NET discussion
Post Reply
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

a printing style

Post by lampson »

Hello.
I need a printing style like this:
1 | Class1 | 1001 | 1002 |1003 |1004 |1005 |
1 | Class1 | 1006 | 1007 | 1008 | 1009 | 10010 |
1 | Class1 | 10011 | 10012 |
2 | Class2 | 2001 | 2002 |
3 | Class3 | 3001 | 3002 |1003 |1004 |1005 |
3 | Class3 | 3006 |
Help...
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

List ClassList = new List();
ClassList.Add(new ClassInfo("1", "Class"));
ClassList.Add(new ClassInfo("2", "Class2"));
ClassList.Add(new ClassInfo("3", "Class3"));
ClassList.Add(new ClassInfo("4", "Class4"));
ClassList.Add(new ClassInfo("5", "Class5"));

List StudentList = new List();
foreach (ClassInfo cls in ClassList)
{
int num = new Random().Next(0, 25);
for (int i = num; i > -1; i--)
{
StudentInfo student = new StudentInfo(cls.ClassID + i.ToString("0000"), cls.ClassName + i.ToString(), cls.ClassID);
StudentList.Add(student);
}
}
Stimulsoft.Report.StiReport r = new Stimulsoft.Report.StiReport();
r.RegData("ClassList", ClassList);
r.RegData("StudentList", StudentList);
r.Design();
}
}

public class ClassInfo
{
public ClassInfo(string classid, string classname)
{
ClassID = classid;
ClassName = classname;
}
public string ClassID { get; set; }

public string ClassName { get; set; }
}

public class StudentInfo
{
public StudentInfo(string studentid, string name, string classid)
{
StudentID = studentid;
StudentName = name;
ClassID = classid;
}

public string StudentID { get; set; }

public string StudentName { get; set; }

public string ClassID { get; set; }
}
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

a printing style

Post by lampson »

mrt file:


True





ClassList

ClassID,System.String
ClassName,System.String
_ID,System.Int32
_Current,System.Object


ClassList
ClassList


StudentList

StudentID,System.String
StudentName,System.String
ClassID,System.String
_ID,System.Int32
_Current,System.Object


StudentList
StudentList




名称

ClassID



名称
关系

ClassID







EngineV2




None;Black;2;Solid;False;4;Black
Transparent


Transparent

0,0.4,19,0.8


All;Black;1;Solid;False;4;Black
Transparent
True
0,0,19,0.8

Arial,8
0,0,0,0
DataClassList_ClassName


{ClassList.ClassName}
Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Center



ClassList

DataClassList





Transparent

0,2,19,0.8
5


All;Black;1;Solid;False;4;Black
Transparent
True
0,0,3.8,0.8

Arial,8
0,0,0,0
DataStudentList_StudentID


{StudentList.StudentID}
Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Center



关系
StudentList


DataStudentList





Transparent
0,3.6,19,0.8


Transparent
0,0,19,0.8

Arial,10,Bold
Right
0,0,0,0
FooterStudentList_StudentID


Black
HotkeyPrefix=None, LineLimit=False, RightToLeft=False, Trimming=None, WordWrap=True, Angle=0, FirstTabOffset=40, DistanceBetweenTabs=20,
Center



FooterStudentList
True





f76da3e3e99e4282a2bb9be19aa2642d
1,1,1,1
Page1
29.7
21


Arial,100
[50:0:0:0]





System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll

Report
4/20/2011 4:28:18 PM
4/20/2011 4:27:01 PM

a6d137316e004905b46ab025c378be94
Report
Centimeters
2010.1.700
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{

public class Report : Stimulsoft.Report.StiReport
{

public Report()
{
this.InitializeComponent();
}
#region StiReport Designer generated code - do not modify#endregion StiReport Designer generated code - do not modify
}
}

CSharp

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

a printing style

Post by Alex K. »

Hello,

In this case, you can add relation and use master-detail.
Please see the modified report in attachment.

Thank you.
Attachments
931.Report_modified.mrt
(7.7 KiB) Downloaded 117 times
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

a printing style

Post by lampson »

Thank you for your answer, but that does not comply with my request.
This is the style I need:

Code: Select all

1 | Class1 | 1001  | 1002  | 1003  | 1004 | 1005  |
           | 1006  | 1007  | 1008  | 1009 | 10010 | 
           | 10011 | 10012 |       |      |       | 
2 | Class2 | 2001  | 2002  |       |      |       |
3 | Class3 | 3001  | 3002  | 1003  | 1004 | 1005  |
           | 3006  |       |       |      |       |
4 | Class4 | 4001  | 4002  | 4003  | 4004 | 4005  |
           | 1006  | 1007  | 1008  | 1009 | 10010 | 
           | 1006  | 1007  | 1008  | 1009 | 10010 | 
           | 10011 | 10012 |       |      |       | 
 
Your Style like this ,and it is not what I wanted:

Code: Select all

1 | Class1 
| 1001  | 1002  | 1003  | 1004 | 1005  |
| 1006  | 1007  | 1008  | 1009 | 10010 | 
| 10011 | 10012 | 
2 | Class2 
| 2001  | 2002  |
3 | Class3 
| 3001  | 3002  | 1003  | 1004 | 1005 |
| 3006  |
Thank you for your help


Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

a printing style

Post by Alex K. »

Hello,

Please see modified report in attachment.

Thank you.
Attachments
932.Report_modified.mrt
(8.58 KiB) Downloaded 124 times
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

a printing style

Post by lampson »

Hi,Successful.
Thanks very much.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

a printing style

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply