Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Wednesday, March 28, 2012

I dont see rendered report.

Hello, when I navigate to this url I can see the report, with the parameters toolbar.

http://agamenon:90/Reports/Pages/Report.aspx?ItemPath=%2fGescomRpts%2fRPT_EvaluacionRequisitos

But when I try to do it with reportviewer; I see the report parameters, then I click Generate Report, and I dont see nothing.

private

void cargarReporte()

{

string reportserver =ConfigurationSettings.AppSettings["ReportServer"].ToString();string reportfolder =ConfigurationSettings.AppSettings["ReportFolder"].ToString();int NmCiclo =Convert.ToInt32(Request.QueryString["NmCiclo"]);int NmEmpresa =Convert.ToInt32(Request.QueryString["NmEmpresa"]);int NmCargoEvaluada =Convert.ToInt32(Request.QueryString["NmCargoEvaluada"]);int NmPersonaEvaluada =Convert.ToInt32(Request.QueryString["NmPersonaEvaluada"]);

rptviewer.ServerReport.ReportServerUrl =

newUri(reportserver);

rptviewer.ServerReport.ReportPath = reportfolder +

"RPT_EvaluacionRequisitos";

rptviewer.ShowParameterPrompts =

true;

}

I had a similar problem. It was caused by setting the height attribute of the ReportViewer web control to "100%" and using asynchronous rendering. Apparently there is a bug in the way the report table is rendered when the height is a percent (http://msdn2.microsoft.com/en-us/library/ms252090.aspx). I changed to synchronous rendering and everything worked fine.

Ojala que esto le ayudaba.

Mike

|||I have the same issue but I set it to FALSE and my reports that have parameters still don't display after I click on the View Report button. However if I run reports that do not have parameters they generate.|||Hi,
Even Iam facing the same problem , did u get any solution? please let me know..

I don't believe ...

I don't believe ...that not exists a resource for put optional parameters for filter in Reports else WorkArounds !!!

Specify a default parameter value. You can then use expressions which allow a row to pass through the filter if this default value is selected.|||

No,

I can't default values

If user not select anything on the combo Box in the parameter filter my reports have to show all rows

I would like to do this whitout use WorkArounds !

[]'s

Christian

|||

This works if you are using Procedure for data retrival and Query parameters to fill the combo box.

If you are using Query Parameters to fill the combobox, then add 'All' as a parameter using UNION function to let user know that you are selecting everything. In the stored procedure ignore the parameter if the user is passing 'All' as a parameter and select everything.

Hope this helps.

|||

Thanks Veepak

This Really work but I think yet this is a workaround !!
I don't have the same performance when I put UNION function in my Query.

But, thanks very much !

|||

Please can you mark it as an answer , it helps if anybody has similar question.

sql

Monday, March 26, 2012

i cant start page to perform

this is my code:

1myconnection =new SqlConnection(kiemtraloi,chuoiketnoi);2mycommand.Parameters.Add(new SqlParameter("@.mancc",SqlDbType.VarChar,10));3mycommand.Parameters["@.mancc"].Value = TextBox1.Text;4myconnection.Open();5myreader = mycommand.ExecuteReader();6if(myreader.HasRows)

And when I click to start button, a error appear:

NO overload for method 'sqlconnection' takes '2' arguments

I don't know what i must do :(, please help me

thx

Is that all you have or do you have more code? Where is the SQL statement? and the command object?|||

string chuoiketnoi = System.Configuration.ConfigurationSettings.AppSettings["myconn"];

System.Data.SqlClient.SqlConnection myconnection;

System.Data.SqlClient.SqlCommand mycommand;

System.Data.SqlClient.SqlDataAdapter myadapter;

System.Data.SqlClient.SqlDataReader myreader;

System.Data.DataSet mydataset;

// khai bao chuoi cho maytinh

string selectquery = "Select * from maytinh";

string insertquery="Insert into maytinh(mamay) values(@.mamay)";

string updatequery="Update maytinh set mamay=@.mamoi where mamay=@.mamay";

string deletequery = "Delete from maytinh where(mamay=@.mamay)";

// khai bao chuoi cho nhacungcap

string selectnhacungcap="Select * from nhacungcap";

string insertnhacungcap="Insert into nhacungcap(mancc,tenncc,diachi,dienthoai) values(@.mancc,@.tenncc,@.diachi,@.dienthoai)";

string updatenhacungcap="Update nhacungcap set mancc=@.manccmoi,tenncc=@.tennccmoi,diachi=@.diachimoi,dienthoai=@.dienthoaimoi where mancc=@.mancc";

string deletenhacungcap="Delete from nhacungcap where(mancc=@.mancc)";

string kiemtraloi = "Select * from nhacungcap where mancc=@.mancc";

|||

That's because the constructor of SqlConnection class only takes 0 or 1 argument, but you pass 2 arguments to it:

myconnection =new SqlConnection(kiemtraloi,chuoiketnoi);

Why did you pass 2 strings to the constructor?

|||

I think he wants:

myconnection=new SqlConnection(chuoiketnoi);

mycommand=new SqlCommand(kiemtraloi,myconnection);

sql

Monday, March 12, 2012

i am trying to move from Access db to Sql.s

hello

i am trying to move from Access db to Sql.s

could you please what is rwong in the sql.s syntax:

Access SP:-

PARAMETERS [@.Date_M_Y] DateTime, [@.BIZID] Long;
SELECT SUM(MINUTE(Time_)) AS MM, SUM(HOUR(Time_)) AS HH, COUNT(Date_) AS SHIFTS, SUM(Money_Sum) AS MONEY_TOTAL, AVG(Money_Sum) AS AVG_MONEY_PER_SHIFT
FROM TblTimeSum
WHERE MONTH(Date_)=MONTH([@.Date_M_Y]) And YEAR(Date_)=YEAR([@.Date_M_Y]) And BIZID=[@.BIZID];

-- SQL.S-

CREATE PROCEDURE SP_SUM

@.Date_M_Y smalldatetime,

@.BIZID int

AS

BEGIN

SELECT SUM(MINUTE(Time_)) AS MM, SUM(HOUR(Time_)) AS HH, COUNT(Date_) AS SHIFTS, SUM(Money_Sum) AS MONEY_TOTAL, AVG(Money_Sum) AS AVG_MONEY_PER_SHIFT

FROM TblTimeSum

WHERE MONTH(Date_)=MONTH([@.Date_M_Y]) And YEAR(Date_)=YEAR([@.Date_M_Y]) And BIZID=[@.BIZID]

END

GO

thanks

I don't believe that T-SQL has a Minute function. Try using the DATEPART function in place of the MINUTE function.

See: http://msdn2.microsoft.com/en-us/library/ms174420.aspx

|||

I think that this has been answered in the Transact-SQL forum.

Often, the quality of the responses received is related to our ability to ‘bounce’ ideas off of each other. In the future, to make it easier for us to offer you assistance, and to prevent folks from wasting time on already answered questions, please don't post to multiple newsgroups. Choose the one that best fits your question and post there. Only post to another newsgroup if you get no answer in a day or two (or if you accidentally posted to the wrong newsgroup –and you indicate that you've already posted elsewhere).

|||

Arnie Rowland wrote:

I think that this has been answered in the Transact-SQL forum.

Often, the quality of the responses received is related to our ability to ‘bounce’ ideas off of each other. In the future, to make it easier for us to offer you assistance, and to prevent folks from wasting time on already answered questions, please don't post to multiple newsgroups. Choose the one that best fits your question and post there. Only post to another newsgroup if you get no answer in a day or two (or if you accidentally posted to the wrong newsgroup –and you indicate that you've already posted elsewhere).

Yes this is very tasteful, welcoming, and polite. It directly answers the original question and promotes deep thought. A good example of the quality found within. If each of us posted this rude comment, the world would be a better place to live but I guess that's how MVP status is obtained.

Let's pass the love forward.

Very nice Arnie. Keep it up.

|||

Yes the date and time functions need to be acheived through a CONVERT() format.

Adamus

Friday, March 9, 2012

I am not getting calender in front of the Date textbox.Pls Help!!!

I created a reoport using wizard.In my quesry i took two date parameters.But when i run my report i get two texboxes StartDate and EndDate.How do i get calender button in front of the text boxes.Below is my query.

SELECT dbo.tblReferralTransferStatus.RefId
FROM dbo.tblReferralTransferStatus INNER JOIN
dbo.tblDownloadTracking ON dbo.tblReferralTransferStatus.VendorId = dbo.tblDownloadTracking.VendorId AND
dbo.tblReferralTransferStatus.DateModified < dbo.tblDownloadTracking.DateModified INNER JOIN
dbo.tblVENDOR ON dbo.tblReferralTransferStatus.VendorId = dbo.tblVENDOR.VendorId
WHERE (dbo.tblVENDOR.VendorName = @.vendorname)AND (dbo.tblReferralTransferStatus.DateModified >= CAST(@.StartDate AS varchar)) AND (dbo.tblReferralTransferStatus.DateModified < CAST(@.EndDate AS varchar))

Hello,

Can you verify that your parameters are set to the DateTime data type? Open Report Parameters from the Report menu, select StartDate and EndDate and make sure the Data type is set to DateTime.

Jarret

I am Having an Odd Problem with Exporting to Excel.

The background:
Before I get into my error let me give you some background in what I am
required to do. All the text field parameters must be stored in the
database. What I mean by this is every text box's value, background
colour, font(weight, size and etc), TextAlign and TextDecoration
information is stored in the database. This includes the fields for
headers and footers. To get these parameters to work properly in
headers and footers I have set up report parameters that get the data
from the database and then feed it to the text fields inside the header
or footer.
The problem:
I am currently getting the following error while trying to export to
Excel:
--
Microsoft Internet Explorer
--
Internet Explorer cannot download Format=EXCEL from SERVERNAME.
Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later.
--
OK
--
After some investigation I discovered that the appearance property
"TextAlign" for all footers is causing this error. So, if I put in
"Left", "Right" or "Center" text directly into the
"TextAlign" field for all the footer text boxes the report exports
into Excel properly. But if I use the property from the database it
will not load into Excel. I've checked to make sure the database
field is giving a valid value. In fact, I've tried all 3 values and
had no luck. I've also tried other TextAlign parameters from
different text fields on the report and received the same error as
stated above.
What I find odd about this is the fact it works fine for all the other
properties but TextAlign. Could this be an obscure bug?
Another thing to note is in Excel I can see the header all the time;
but, I can only see the footer when I am in print preview. Is there a
way to have the footer set up just like the header; so, it is just on
bottom of the page instead of being a "true" footer. It wouldn't
be a pretty way to solve my issue but I think it would at least allow
my clients to use Excel export for now.Oh I am using SQL Server 2000 Reporing Services with SP2.|||Hello!
I have encountered the same problem with export to Excel ("Internet Explorer
cannot download Format=EXCEL from SERVERNAME."). In my case the solution was
simple. I've had just to make the name of the report shorter. You can simply
upload your rdl under another (shorter) name to report manager and it will
possibly start working.
"Jeremy Balliston" wrote:
> Oh I am using SQL Server 2000 Reporing Services with SP2.
>|||Any ideas?