Charles Thomas Blankenship...
|
|
Group: Awaiting Activation
Posts: 172,
Visits: 12K
|
I always like to make sweeping claims like this as there is always someone (or somebodies) that know more than I do and can provide additional information that makes the tutorial even better. - Dynamically configuring a report based upon an SQL Server table (ReportEngine)
- Methodology for abstracting business objects (three layers are illustrated)
- Class Diagrams for Business Layer, BOL and Report BO classes
- Description of the Business Binding Source as it relates to Generics
- Creating a simple Customer List
- Filtering the contents of that Customer List by collecting information from the user
- Adding custom properties to Report Business Objects
- Illustrating how powerful the Report Engine table can be
- How to subclass an XtraReport so that common processing can be consumed over every report in your application
- Creating an Inherited Report
- Create a Master-Detail using the data "Flattening" methodology
- Create a Master-Detail report by using multiple Data Sources and Sub-reports
Here it is ... https://www.dropbox.com/s/1e82qqb7h96pfu6/DXStrataFlix.zipDevExpress 13.2.7Free, web based, UML Modeling tool (FREE)
Charles T. Blankenship Senior Consultant Novant Consulting, Inc. 704.975.7152 http://www.novantconsulting.com
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Charles, Nice to see you getting deep into the DevExpress SF integration. 46 pages document seems interesting, so I will print it out and read it carefully. I have been very busy with no much time to spare in the forums, but definitely will get back to you as soon as I can. Thanks for the tutorial.
Edhy Rijo
|
|
|
Terry Bottorff
|
|
Group: Forum Members
Posts: 448,
Visits: 12K
|
I would love to read your paper but I tried downloading it twice and I get a corrupt file. I am not sure whether that happens on my end or whether it is on your end. FYI.
I will try it on another machine later and let you know what happens.
You are a stellar person to make this available to us. Thank you.
|
|
|
Terry Bottorff
|
|
Group: Forum Members
Posts: 448,
Visits: 12K
|
I had no issue on my Win 7 machine. Just on my Win 8.1 machine. Not sure why but at least I got it. I thank you again.
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Terry, I am Win 8.1 and opened up without issues from the DropBox link.
Edhy Rijo
|
|
|
Charles Thomas Blankenship...
|
|
Group: Awaiting Activation
Posts: 172,
Visits: 12K
|
I was reading through all of the posts on the topic and ran into several referencing having to use DataTables and other structures outside of StrataFrame ... as it turns out ... you can use everything in DevExpress XtraReports without having to exit the StrataFrame environment at all. You don't even have to make any modifications to the SF source code either (initially I thought I might have to).
I wouldn't have even known DevExpress had a report engine if it weren't for you ... THANKS!
C. T.
Charles T. Blankenship Senior Consultant Novant Consulting, Inc. 704.975.7152 http://www.novantconsulting.com
|
|
|
Terry Bottorff
|
|
Group: Forum Members
Posts: 448,
Visits: 12K
|
I'll reset my wireless adapters because I think I am having an issue with it. Glad to know it works with Win 8.1 with no issues. I'll also try the Dropbox side.
Thanks.....
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
You Are welcome Charles. The only thing I have not been able to do with DevExpress Reports and SF is to preview the report in the VS IDE since I am using SF BBS, but have not had the time to look for a solution and the upcoming SF2.0 have a much better Business Object class that would be able to talk to any 3rd party tool like all DevExpress controls without the need to use the SF Business Binding Source and then I almost sure we will be able to preview the report while designing it.
Edhy Rijo
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Charles, Your DDT package DXStrataFlixDDT.pkg does not contain any metadata with your fixed data to test your reports. All tables are empty, specially your ReportEngine. Please provide a DDT package with the Deployment Data or include a copy of your MS-SQL Database in your DropBox so we can test it.
Edhy Rijo
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Charles, I have review your code and have couple of suggestions: - When creating SqlCommand objects, try using the "using" command to speed up your code and allow the .Net garbage collection to dispose the object more efficiently.
public void fillAll() { using (SqlCommand oSqlCmd = new SqlCommand()) { oSqlCmd.CommandText = "SELECT * FROM Customers ORDER BY cust_LastName"; FillDataTable(oSqlCmd); } }
- When creating Sql CommandText, take advantage of the String.Format to build your SQL string and use Parameters instead of adding the value to the string, here is a sample of your CustomersBO.fillByLastName method:
public void fillByLastName(string lastName) { using (SqlCommand oSqlCmd = new SqlCommand()) { oSqlCmd.CommandText = String.Format("SELECT * FROM {0} WHERE UPPER(cust_LastName) LIKE '{1}'% ORDER BY cust_LastName", this.TableNameAndSchema, "@LastName"); oSqlCmd.Parameters.AddWithValue("@LastName", lastName.ToUpper()).SqlDbType = SqlDbType.VarChar; FillDataTable(oSqlCmd); } }
Your project is pretty good organized, that is important, as well as your naming convention too. In my case for SF Custom Field Properties I would prefix the property with "cfp_", so when using it in the field builders of DevExpress, I can clearly know this is a Custom Field Property: [Browsable(false), BusinessFieldDisplayInEditor, Description("Customer Last, First and Middle Name"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string cfp_cust_LastFirstMiddle { get { return string.Format("{0}, {1} {2}", this.cust_LastName, this.cust_FirstName, this.cust_MiddleName); } }
Also, I would always use a Base Business Object class, to hold common methods and properties like the FillAll() method which it is mostly used by every BO.
Again, those are just suggestions, which means, there is nothing wrong with your original code. Oh, I almost forgot, in your document to said: "Alsoanother big thanks to Edhy for ignoring my request to help with regards to mycomplete and total ignorance of using this tool." Not quite true based on the number of post I have here I probably missed a post due to a lot of work with my customers, fortunately since last November 2013 I have been pretty busy working on several project and not having too much time to share with my peers.
Now where is your version of the StrataFlix database so I can test your would project? Let's the fun begin.....
Edhy Rijo
|
|
|