[Bug] Handling External Style Sheets properly

3 posts, 1 answers
  1. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 26 Jun 2008 Link to this post

    I've been looking for a good way to standardize reports across our several applications, and the use of the external style sheets seems to be a good way to go - I've set up each report to reference the style sheet. However there's a fairly large problem I'm not sure how to get around.

    First, the solution structure:

    1. Data Library
    2. Reporting Library
    3. Main application / Small seperate Reporting application /  Windows service

    3 references 2 which references 1.

    The problem is two fold.

    A) I have a laptop and a desktop, and their folder structures differ. So one has H:\Documents\Projects\ReportingLibrary\ and the other has C:\Projects\ReportingLibrary. This causes me issues every time I switch back and forth, because the reports store the absolute path to the external style sheet - each time I switch I get path not found errors and I can't even view the report without first going in and manually changing the path.

    B) I tried solving the above problem by entering a relative path manually - ie, "\\Stylesheet.xml". This .. sort of works. Unfortunately (and I would consider this a bug) the designer seems to think that it needs to look in the SOLUTION folder for the relative path! So as soon as I add the ReportingLibrary project to another solution it errors out again (and remember, I've got 3 different solution files, one for each type of application).

    End result is I'm chucking copies of this xml file all over my projects just to get the designer to behave - I've got it working to extract the xml from the resource manifest in the dll and use that at run time, but during design time it is kind of important to have your styles properly applied.

    I would request 2 options here:

    1. Have an option for specifying a relative path in the collection editor for external styles.
    2. When resolving relative paths at design time, start at the project level, not the solution.

  2. Answer
    Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 27 Jun 2008 Link to this post

    Hi Pawz,

    We are aware of all those issues and that is why we have reworked ExternalStyleSheets completely.

    In the upcoming version Q2 2008 external style-sheets will be be much more flexible. You will be able to add an external style-sheet and then specify the way it should be resolved. You will be able to resolve it by relative path, absolute path, or embed the XML file as a project resource and use it by resource name. Additionally, you will have the option to load an external style-sheet from an web URL. This basically covers all possible scenarios that people might need.

    Fortunately, your two requests match exactly the way we have implemented that functionality:
    1. You will have a way to tell that the path is relative.
    2. ... and yes, it will be relative to the Project Root :)

    You can expect the new Q2 2008 version at the end of July.

    Here is a little teaser of what the new external style-sheet editor will look like:

    We really hope that you will like it.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 29 Jun 2008 Link to this post

    Wow, that's exactly what I love to hear - 'already fixed' is music to my ears :).

    Looking forward to the July release!
Back to Top