0
votes

i'm building a SSRS Report with 3 Tablix that i want to fill with just 1 DataSet, each tablix has to show me different data (Obviously) but the problem it's when on 2 of them i need to set data using relative time, not dates, for now i do it setting a DataSet for each tablix, and each dataset is querying with FetchXml.

This is the example:

Table 2 Dataset filter Query

<?xml version="1.0"?>
<fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
    <entity name="Entity1">
        <attribute name="Att1"/>
        <attribute name="createdon"/>
        <attribute name="modifiedon"/>
            <order descending="false" attribute="Att1"/>
                <filter type="and">
                    <condition attribute="modifiedon" value="7" operator="olderthan-x-days"/>
                    <condition attribute="modifiedon" *value="14" operator="last-x-days"*/>
                </filter>
    <link-entity name="Entity2" alias="DataTab1" to="Att1" from="Entity1">
        <attribute name="Att2_DataTab1"/>
        <attribute name="createdon"/>
        <filter type="and">
            <condition attribute="createdon" value="14" operator="last-x-days"/>
        </filter>
    </link-entity>
</entity>

And Table 3 Dataset filter Query

<?xml version="1.0"?>
<fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
    <entity name="Entity1">
        <attribute name="Att1"/>
        <attribute name="createdon"/>
        <attribute name="modifiedon"/>
            <order descending="false" attribute="Att1"/>
                <filter type="and">
                    <condition attribute="modifiedon" value="7" operator="last-x-days"/>
                </filter>
    <link-entity name="Entity2" alias="DataTab1" to="Att1" from="Entity1">
        <attribute name="Att2_DataTab1"/>
        <attribute name="createdon"/>
        <filter type="and">
            <condition attribute="createdon" value="7" operator="last-x-days"/>
        </filter>
    </link-entity>
</entity>

Since i'm Using the same information and the only thing that i need to change is the filtering structure on each Tablix, how can i add FetchXML Filter conditions to the Tablix properties filters?

enter image description here

Thanks for any clue that you can gimme :)

1

1 Answers

0
votes

You could make use of parameters. you can give in the additional data that you use in the filtering as a parameter.

It should be something like @variable in your fetchxml