THE Definitive Guide for using DevExpress XtraReport with SF 1.7.6


Author
Message
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Does anyone know how to delete duplicate posts Crazy

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
BigGrin ... ha, ha, ha ... I was hoping you would take that as a subtle poke in the ribs ... but in all honesty ... if you did jump in and fix my problem I would have never gotten to the point where ended up ... IOW ... discovering all the idiosyncrasies for myself was a much better approach.  No offence intended.

I didn't provide a .DDT file because I included the .bak for the entire StrataFlix database ... I thought it would be easier just to let people restore it over their existing StrataFlix.mdf

Thanks for the USING suggestion ... I'll make those changes and then repost the .zip file.

As for including deployment data from the Database Deployment Toolkit ... the only data I know how to deploy from that is the Security and Messaging files.   How do I get the Customers, Customer Orders, Customer Order Items and Report Engine table data inside the DDT?

Thanks,

CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
BigGrin ... ha, ha, ha ... I was hoping you would take that as a subtle poke in the ribs ... but in all honesty ... if you did jump in and fix my problem I would have never gotten to the point where ended ... IOW ... discovering all the idiosyncrasies for myself was a much better approach.  No offence intended.

I didn't provide a .DDT file because I included the .bak for the entire StrataFlix database ... I thought it would be easier just to let people restore it over their existing StrataFlix.mdf

Thanks for the USING suggestion ... I'll make those changes and then repost the .zip file.

As for including deployment data from the Database Deployment Toolkit ... the only data I know how to deploy from that is the Security and Messaging files.   How do I get the Customers, Customer Orders, Customer Order Items and Report Engine table data inside the DDT?

Thanks,

CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
BigGrin ... ha, ha, ha ... I was hoping you would take that as a subtle poke in the ribs ... but in all honesty ... if you did jump in and fix my problem I would have never gotten to the point where ended ... IOW ... discovering all the idiosyncrasies for myself was a much better approach.  No offence intended.

I didn't provide a .DDT file because I included the .bak for the entire StrataFlix database ... I thought it would be easier just to let people restore it over their existing StrataFlix.mdf

Thanks for the USING suggestion ... I'll make those changes and then repost the .zip file.

As for including deployment data from the Database Deployment Toolkit ... the only data I know how to deploy from that is the Security and Messaging files.   How do I get the Customers, Customer Orders, Customer Order Items and Report Engine table data inside the DDT?

Thanks,

CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
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 Hehe 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? BigGrin   Let's the fun begin.....w00t


Edhy Rijo

Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
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
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
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

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)Advanced StrataFrame User (676 reputation)
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.....
Charles Thomas Blankenship...
Charles Thomas Blankenship
StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)StrataFrame User (376 reputation)
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
Edhy Rijo
E
StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)StrataFrame VIP (3.8K reputation)
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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search