Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6192121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:53:25+00:00 2026-05-24T02:53:25+00:00

I have a big trouble with report services. I need to use a stored

  • 0

I have a big trouble with report services.
I need to use a stored procedure with 2 parameters (2 id).
If 1st parameter is filled then a SELECT is launched.
If 2nd parameter is filled then another SELECT is launched.

CREATE Procedure apGetEvrPourRapport
@id_exu int, @id_exd int
AS
BEGIN
  IF isnull(@id_exu, 0) > 0
    print 'id_exu : ' + cast(@id_exu as nvarchar(16))
    BEGIN
        EXEC apReport_Extrait_Lecture_Filtre @id_exu, null
    END
-- Cas du document unique et document de travail
  IF isnull(@id_exd, 0) > 0
    print 'id_exd : ' + cast(@id_exd as nvarchar(16))
    BEGIN
               --EXEC another sp
    END
END

In Data of Report Services, I retrieve the good SELECT when I filled the correct parameter in execution by the exclamation mark, but in Dataset View, I retrieve only the 2nd SELECT and so the preview fail 🙁

How to set Dataset to take in consideration this switch of SELECT ?

Thank you for helping.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:53:25+00:00Added an answer on May 24, 2026 at 2:53 am

    I did exactly this about a month ago.

    What you have to do is manually add the fields to the XML withing the “Fields” node of the “Dataset” node of the report, then call your stored procedure with all of its parameters. You will want to hide any columns that will not get a value in a specific scenario or they will show “#ERROR”.

        <Field Name="status">
          <DataField>status</DataField>
          <rd:TypeName>System.Byte</rd:TypeName>
        </Field>
        <Field Name="longname">
          <DataField>longname</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
        <Field Name="name">
          <DataField>name</DataField>
          <rd:TypeName>System.String</rd:TypeName>
        </Field>
    

    You will not be able to modify your dataset in the designer again or it will wipe out your fields and/or not save. You can still modify the other parts of your report in the designer, however.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have big trouble with file uploads with php. My own tests are successful
So I have a big trouble handling the ICollection field on this model This
2Im in a big trouble, im refactoring a very big procedure to full text
I have a big trouble with the multiplication of floats. here is the example:
I have some trouble of figuring out how to use group_concat to produce certain
i have big trouble with my application that web-application(jsp,java,servlet) landed between two server cause
I have got a big trouble in my Xml generator using C#. I could
So I have a big trouble understanding how to override a css rule inhered,
I am in big trouble at the moment. We have a huge JS library
I have some big data objects, stored in CompressedData property, so I don't want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.