ssrs 2008 conditional on a rectangle

  • In an existing ssrs report 2008, there is currently one letter being generated. Now the user wants 2 to 3 letters to be placed in the same file so they would print one right after the other. The only difference would be the address of the customer. I want to be able to have a page break between each letter. The data for the report is obtained from a varchar(max) column where the data is actually html. Data for all 3 letters would be contained within the one column called col1.

    What I would like to do is have a conditional statement on a rectangle so the page break occurs where I would want it to. I would like the conditional statement to look for a literal somewhere within the field called col1 and have the page break occur after that point. The conditional statement would look for a literal like '<span style="font-family: arial,sans-serif; "> </span>'.

    Thus can you tell me if this is possible or not? If so, would you show me how to setup the code? If this is not possible, would you tell me if there are any other alternatives and what I can do for the alternative to occur?

  • why not just put each letter in its own rectangle? (and all 3 inside another rectangle). Then you can control the page breaks yourself

  • I like your idea of having 3 separate rectangles and embedding those 3 rectangles into one overall rectangle!

    However I am not certain how each rectangle will know which letter is set for it to use.

    All the data is stored in a varchar(max) field in a column called stringtemplate.

    The following is a simplified version of what the data would look like:

    <p>test1</p>

    <p style="page-break-after:always;"></p>

    <p>test2</p>

    <p style="page-break-after:always;"></p>

    <p>test3</p>

    <p style="page-break-after:always;"></p>

    in the stringtemplate field.

    Thus I have the following questions:

    1. How would rectangle1 know how to look for <p>test1</p> ?

    2. How would rectangle2 know how to look for <p>test2</p> ?

    3. How would rectangle3 know how to look for <p>test3</p> ?

    4. I probably do not need the lines '<p style="page-break-after:always;"></p>', correct? This is in html

    trying to cause a page break to occur.

    5. For each rectangle to pick only the parts of the field that it needs, would I use the filter option on a rectangle? Would the

    condtional look something like =MID(MID(Fields!txt2.Value, INSTR(Fields!txt2.Value, "|") + 1, LEN(Fields!txt2.Value) ), 1, INSTR(MID(Fields!txt2.Value, INSTR(Fields!txt2.Value, "|") + 1, LEN(Fields!txt2.Value) ), "|") - 1) ? Would you show an example of the conditional that needs to be used?

    6. The visibility of the textbox should probably use the same logic that the filter uses? Would

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply