Friday, February 10, 2012

cannot find page when generating the report

I click a button to preview the report. The link is

http://localhost/rpt/report_order_summary_cust&rs:Command=Render&rc:Parameters=False&cust_code=cctest&supp_code=%&from_date=2005/01/01&to_date=2007/01/01

I got two file in the rpt folder. they are named as report_order_summary_cust.rdl.data and report_order_summary_cust.rdl.

I wrote a function to generate the report which is

1const string RS_NAME ="report_order_summary_cust";2const string RS_CMD ="&rs:Command=Render&rc:Parameters=False";3string rs_para;4string rs_url;56//parameters7string para_cust_code = lblSelectedCustCode.Text;8string para_supp_code = ddl_supplier.SelectedValue;9string para_from_date = txtFromDate.Text;10string para_to_date = txtToDate.Text;111213RSPath = rtn_http_dir(RSPath);14para_from_date = Convert_date(para_from_date);15para_to_date = Convert_date(para_to_date);161718string[] arr_cust_code = para_cust_code.Split(';');1920for (int index=0; index < arr_cust_code.Length; index++)21{22string cust_code = arr_cust_code[index].ToString().Trim();23rs_para ="&cust_code="+ cust_code +24"&supp_code="+ para_supp_code +25"&from_date="+ para_from_date +26"&to_date=" + para_to_date ;27rs_url = RSPath + RS_NAME + RS_CMD + rs_para;282930string script ="<SCRIPT LANGUAGE='JAVASCRIPT'> window.open('" + rs_url +"','_blank','height=700, width=1050, top=0,left=0,toolbar=no,menubar=no, scrollbars=yes, location=no, status=no');</SCRIPT>";31Page.RegisterStartupScript("Script_" + index.ToString(), script);3233}

When i click the button the above code will be run. However, the pop up windows show that the page cannot be found. I would like to know what problem it is? (I am now to reporting service)

I am using vs2003 + server 2000 reporting service

Thank you.

have you tried url encoding the link. Those dates could cause you problems.

No comments:

Post a Comment