8 Replies Latest reply: Aug 9, 2012 9:34 AM by nagornyi RSS

    Conditional Formatting...

    Marc_89
      Hi all,

      Wonder if you can help me. I am using conditional formatting to hide a column, this works fine.

      But when i upload the RTF template to BI Publisher and output the report as XML the column still shows up. Is there a way to conditionally hide it in the XML aswell?

      If so could you point me in the the right direction,

      Thanks,
      Marc.
        • 1. Re: Conditional Formatting...
          AlexAnd
          conditional formatting work for template like rtf, excel (xml isn't changed)

          if you want show/hide some xml element then need to change the method of forming a xml
          • 2. Re: Conditional Formatting...
            Marc_89
            Thank you for you Email,

            I guess that RTF wouldnt change it, been looking into it this morning. but thanks for the clarification

            do you know the best method to use? I want the column to be accessible by the report because it contains data that is used to determine what data is actually shown in the report and depending on what is in the columns determines what data the user sees.

            I just dont want to show the column in the XML output.... if that makes sense.

            Edited by: 951250 on Aug 7, 2012 5:24 AM
            • 3. Re: Conditional Formatting...
              nagornyi
              XML is not just one of output formats, it's a source data for the report. The data cannot affect report, unless they are in the XML. Pleae, give a simple example of what you are trying to achieve to see how it can be done.
              • 4. Re: Conditional Formatting...
                Marc_89
                Ok here is what i want to do...

                the back end database has been setup to display 3 different tables a, b and c... each table has a user associated with it.

                when user 1 is called table a is shown, when user 2 is called table b is shown and so on. The Tables that are not shown will be Null.

                all 3 users will have different data shown to them, columns will be hidden, column names will be different etc... I want this done all from one report, and output the XML with the corresponding columns hidden and also column headers will be different depending on which user runs the report.

                Thanks.
                • 5. Re: Conditional Formatting...
                  AlexAnd
                  did you try to forming needed xml based on some conditions in sql (in your case by user) ?
                  • 6. Re: Conditional Formatting...
                    nagornyi
                    You can substitute different tables in the data model SQL depending on the user. You need, however, use some generic column names in the SQL, like Column1, Column2, ... etc., so that you could build your template. To display titles for those columns you can again use user as parameter, but this time on the template level.
                    • 7. Re: Conditional Formatting...
                      Marc_89
                      Ok i understand this, but by going back to the template level when i output this in XML i am going to have the same issue as i originally had? the hidden columns in the template will show because XML is taken directly from the data model and is not rendered via the template....
                      • 8. Re: Conditional Formatting...
                        nagornyi
                        No - the columns are not hidden, they are just not in the XML. Under the generic names Column1, Column2, ... the XML brings the data only for the current user. On the template, however, you will need to provide the correct column names, if they depend on user.