Previewing Report in Designer With DataSource Containing SQL Parameter

Stimulsoft Reports.NET discussion
Post Reply
BatutaBunsing
Posts: 7
Joined: Thu Dec 30, 2010 11:36 am

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by BatutaBunsing »

How do I supply the value for an SQL Parameter to a report when viewing it in the Designer?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by Alex K. »

Hello,

If we understand you task correctly, you can use variable with "Request from User" options.
Please see the sample report in attachment.

Thank you.
Attachments
759.SampleReport.mrt
(11.45 KiB) Downloaded 433 times
BatutaBunsing
Posts: 7
Joined: Thu Dec 30, 2010 11:36 am

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by BatutaBunsing »

I was able to accomplish this by specifying a default value (temporary) for the parameters which I have defined.

Nonetheless, the advice you gave also worked out fine.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by Alex K. »

Hello,

Let us know if you need any additional help.

Thank you.
agriffiths
Posts: 3
Joined: Thu Apr 14, 2011 8:49 pm
Location: Australia

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by agriffiths »

I have another question about the default values with the .Web Designer

If my SQL DataSource is "Select * FROM TableName WHERE ID = @ID"

I can set the Parameter for the Viewer but the Designer seems to only use the Default value
Is there a way to pass in the new parameter value to the designer preview?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Previewing Report in Designer With DataSource Containing SQL Parameter

Post by Alex K. »

Hello,

Alternatively, you can add a variable with the default value and put this variable into the parameter expression.

Thank you.
Attachments
924.Capture01.PNG
924.Capture01.PNG (67.94 KiB) Viewed 1840 times
923.Capture02.PNG
923.Capture02.PNG (49.77 KiB) Viewed 1843 times
Post Reply