Showing posts with label window. Show all posts
Showing posts with label window. Show all posts

Thursday, March 22, 2012

custom web app for reportviewer

Hi,

I am trying to develop a custom web page to display and generate our company reports.

It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a

dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame

that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the

generated report).

Does anybody has some pointers or links on the web where some of this is a little bit documented.

I have dev skills in vb.net and know how to work with ssrs.

My web dev skills are intermediate.

All info, tips, hints are very welcome ...

Greetings

Vinnie

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

|||

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ConfigurationManager.AppSettings.GetValues("RSReportpath")[0].ToString() + ReportName; // @."c:\code\slimcommon\reporting service reports\rs report\" + ReportTitle + ".rdl";// Application.StartupPath;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

sql

custom url not recognized

i have this action.jumpto url

="javascript:void window.open('http://bklc-crm01:5555/cs/cases/edit.aspx?id={" & cstr(Fields!incidentid.Value) & "}','_self')"

for some reason when i use this field (incidentid.value) there is no hyperlink generated, however when i change the value to another field, the hyperlink works, what shall i be looking for, incident value is a set of number with dashes!

i fixed it, in order to get it to fill out property i used the .tostring method for the field

Thursday, March 8, 2012

custom forms

I have created custom form without borders , i have written functions to minimize, maximize, exit and even for moving the window, now i need to write function to resize the window , is there any way resize the window...locking this post as this isn't replication or sql server related, and I can't move it since I don't even know what programming language you're using. Please repost your question in the correct forum.

Friday, February 24, 2012

Custom code changes don't "take"

I am having a problem when I add a function to the Code window it
isn't recognized. When I do a compile I get an error because the
expression doesn't 'see' the new function.
I have closed the .rdl, I have closed down Visual Studio. Has anyone
else run into this problem?
Thanks in advance.
PattiAre you getting error messages? If so, what? Have you tested the code?
daw
"patti" wrote:
> I am having a problem when I add a function to the Code window it
> isn't recognized. When I do a compile I get an error because the
> expression doesn't 'see' the new function.
> I have closed the .rdl, I have closed down Visual Studio. Has anyone
> else run into this problem?
> Thanks in advance.
> Patti
>