Reducing XAP Size in Silverlight and Problems

We were having problem with reducing XAP size. Basically third party were not getting picked automatically with the “Application Library Caching” in silverlight.

So searched a little we found out that based on following articals, we needed to have “.extmap.xml” for each assembly that we used in Silverlight.

For Instance InfragisticsSL4.Controls.Editors.v10.3.extmap.xml, now this file contains following mapping xml for that assembly.

<?xml version=”1.0″?>
<manifest xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema“>
  <assembly>
    <name>InfragisticsSL4.Controls.Editors.v10.3</name>
    <version>10.3.20103.1006</version>
    <publickeytoken>7dd5c3163f2cd0cb</publickeytoken>
    <relpath>InfragisticsSL4.Controls.Editors.v10.3.dll</relpath>
    <extension downloadUri=”InfragisticsSL4.Controls.Editors.v10.3.zip” />
  </assembly>
</manifest>

NOTE:

  1. version, publickeytoken should be same as per assembly.
  2. The ExtMap XML files need to be at the Location from where you added refrence to silverlight project. (like some seperate folder for assemblies)
  3. You can download EMM tool fromhttp://blogs.microsoft.co.il/blogs/alex_golesh/archive/2009/07/16/small-utility-extmap-maker.aspx and make your life easy.

References:

http://forums.esri.com/Thread.asp?c=158&f=2455&t=297234

http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2009/07/16/small-utility-extmap-maker.aspx

Thanks,

Dynamic Reports with Telerik (Silverlight4 – Part 2)

We have been work hard to get running with dynamic reports. I admit that Telerik solution for report is pretty cool.

There were are following options to get our work going:

  1. Make use of “Table” API in Telerik Report
  2. Simple approach of making fields and align them properly

Option 1, failed to great extent in terms of loading heavy amounts of data. (1600 rows, between is not heavy). Researched on it today and submitted ticket to telerik 448457. With that i hope they fix the issue of table rendering. There is something seriously wrong with their approach.

That being said, i really like the support they give to people for their solution, help system and follow-ups are quite good. With Video tutorials – it makes life easier when you get stuck into some problem.

Now, we went for other (simpler) approach.

Rough flow of information through the silverlight application

Silverlight -> WCF (ReportService.svc) -> Report_NeedDataSource -> Build Report Columns, and provide the data source itself.

Now, Passing information of the context, connection string and running or making query for report posts lot of questions

  1. Security
  2. How to pass back and forth
  3. Fields to display

With that in mind, we used simple parameter passing with some token that tells us where to look for information. This allow us to not send any connection string infomation though the wire.

// important

((System.ComponentModel.ISupportInitialize)(report)).BeginInit();

//get details section, you can get name of the detail section by looking at definition of

//InitializeComponent

DetailSection detailSection = report.Items[“detail”] as DetailSection;

//set height

detailSection.Height = Unit.Inch(0.2);

String[] fields = ….

foreach (String fld in fields)

{

//Fields

Telerik.Reporting.TextBox numberTextBox = new Telerik.Reporting.TextBox();

Telerik.Reporting.TextBox grpHeaderLabel = new Telerik.Reporting.TextBox();

numberTextBox.Left = Telerik.Reporting.Drawing.Unit.Inch(counter);

grpHeaderLabel.Left = Telerik.Reporting.Drawing.Unit.Inch(counter);

//Your Logic for alignment or any other goes here…

//Add them to respective sections

detailSection.Items.Add(numberTextBox);

grp.GroupHeader.Items.Add(grpHeaderLabel);

counter += 1D;

}

//Make Data Source

Telerik.Reporting.SqlDataSource dataSource = new Telerik.Reporting.SqlDataSource();

//connection code goes here…

//select query

dataSource.SelectCommand = “Select fields from table “;

report.DataSource = dataSource;

//pretty important

((System.ComponentModel.ISupportInitialize)(report)).EndInit();

Ok, thats all you need to do.

Note: Create a Blank Report for Telerik.Reporting and then write code in there.

Thanks,

Dynamic Telerik Reports in Silverlight

Guys,
We are going to start working on the dynamic report building thorugh telerik today. It will be a complete dynamic engine with flexibility to user to define following:

  1. Header
  2. Footer
  3. Column/ Fields that needs to be in the report
  4. Formatting Based on Type of Fields

going to take help from http://www.telerik.com/help/reporting/programmatic-control-of-reports.html, and will keep you people posted.

Keep hitting…

    JOB: Require Senior Asp.NET Developers x 2

    Hi,

    We are require another Asp.net Developer at Vanguard Software Group for their pakistan office.

    Experience Required: 4+

    Number of Post: 2 now …

    What we offer:

    1. Smooth Enviornment
    2. Good work ethics
    3. Laptop
    4. Medical
    5. Paid Leaves
    6. Opportunity to learn new things
    7. No LATE SITTINGS 🙂 – Guaranteed

    So, send in your Cvs to rizwan@vsgsolutions.com / rizworks@gmail.com

    Web: http://www.vsgsolutions.com

    Looking forward for good ones…

    Thanks,

     

    Thanks,

    Telerik Reporting Deployment For Silverlight

    We were facing problem in deploying Telerik Report for Silverlight in Production Enviornment.

    The Solution to preblem is that to have the following assemblies are needed to be set as “Copy As Local = true” in your WEB PROJECT

    • Your Reporting Library For Telerik Reports
    • Telerik.Reportig
    • Telerik.Reporting.Service
    • System.ServiceModel

    Also, ReportService.svc needs to be exist at Root Folder of web project. (Although not necessary you can always change it from your code)

    I hope this saves somebody lots of time.

    Thanks,