How to export one tablix in excel and other tablix to .dat file from single rdl in ssrs?

MADDELA SATISH KUMAR REDDY 1 Reputation point
2021-03-19T06:00:31.413+00:00

As per requirement i have created a report which has 2 Tablix's both have different data. Now i have to export tablix1 data to Excel(tablix2 should not come in excel) Tablix2 to .dat file/text file(tablix1 data should not come). Right now if i export to .dat file data from tablix1 also coming. Note:i have updated report server config to generate .dat file Please suggest how we can do this in ssrs.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,790 questions
{count} votes

4 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 32,426 Reputation points
    2021-03-19T06:43:58.193+00:00

    Hi @MADDELA SATISH KUMAR REDDY ,

    You may set the tablix1's hidden property with expression:

    =IIF(Globals!RenderFormat.Name = "EXCELOPENXML", False,True)

    Set the tablix2's hidden property with expression:

    =IIF(Globals!RenderFormat.Name = "TXT", False,True)

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October


  2. Russel Loski 421 Reputation points
    2021-03-19T13:20:52.51+00:00

    A modification of @ZoeHui-MSFT answer:

    Set the tablix2's hidden property with expression:  
      
    =IIF(Globals!RenderFormat.Name = "EXCELOPENXML", True,False)  
      
    Set the tablix1's hidden property with expression:  
      
    =IIF(Globals!RenderFormat.Name = "TXT", True,False)  
    

  3. ZoeHui-MSFT 32,426 Reputation points
    2021-03-22T01:47:13.29+00:00

    Hi @MADDELA SATISH KUMAR REDDY ,

    Thanks for your reply, just change the expression to meet your needs as you commented.

    You may set the tablix1's hidden property with expression:

    =Globals!RenderFormat.Name = "TXT"  
    

    Set the tablix2's hidden property with expression:

    =Globals!RenderFormat.Name = "EXCELOPENXML"  
    

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October


  4. ZoeHui-MSFT 32,426 Reputation points
    2021-03-25T01:33:34.067+00:00

    Hi @MADDELA SATISH KUMAR REDDY ,

    Please refer below:

     <Extension Name="CSVTXT" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">  
            <OverrideNames>  
              <Name Language="en-US">TXT (Pipe Delimited Text File)</Name>  
            </OverrideNames>  
            <Configuration>  
              <DeviceInfo>  
                <FileExtension>TXT</FileExtension>  
                <NoHeader>true</NoHeader>  
              </DeviceInfo>  
            </Configuration>  
          </Extension>  
    

    or

    <Extension Name="PIPE" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">  
                   <OverrideNames>  
                         <Name Language="en-US">TXT (Pipe delimited)</Name>  
                   </OverrideNames>  
                   <Configuration>  
                     <DeviceInfo>  
                         <FieldDelimiter>|</FieldDelimiter>  
                         <FileExtension>txt</FileExtension>  
                     </DeviceInfo>  
                   </Configuration>  
    </Extension>  
    

    Don't forget to back up your config file and restart SSRS.

    Regards,
    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    What can I do if my transaction log is full?--- Hot issues November

    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments